Managing dockers on Windows - windows

I'm using dockers on a Windows server 2016, to run all sorts of Windows applications/tasks.
There are several solutions to manage dockers, such as swarm and marathon, but they don't work on Windows (or do work on Windows but via virtual box vm, which is problematic for my needs).
In the future mesos and dc/os will support Windows, but in the meanwhile,
is there an alternative that can work for Windows?

I'd suggest setting up a docker container to manage the rest of your docker.
A couple containers which do exactly that:
http://portainer.io/
DockerUI
If you don't like that you could use a (local) gui to manage it, the only one I know of is:
simple-docker-ui

Related

Do Amazon Workspaces support Docker for Windows?

I'm currently using a VM hosted on-site by the company I work for. The VM is pretty slow, and we're looking at doing something about it. The choices are to get people off of VMs and onto physical hardware, upgrade our VM host or potentially move to Amazon Workspaces.
One of the challenges we're hitting on our current host is that we're running into problems having nested virtualization to run Docker on our workspaces.
Obviously, if we were to move to physical hardware, we would not have the problem with nested virtualization. If we upgrade our current hardware to be faster/better, we may not solve the underlying issue with nested virtualization.
It would be ideal if Amazon Workspaces supported Windows 10 with Docker for Windows allowing nested virtualization.
Does anybody on here use AWS workspaces with Windows? Do you use Docker?
Any other alternatives(other than AWS workspaces) that can be used to run Docker on Windows VM?
The answer to this is now documented in the Amazon WorkSpaces troubleshooting guide. As of Jan, 2021 Docker is now supported on Linux but not supported on Windows.
Nested virtualization (including the use of Docker) is not supported on Windows WorkSpaces.
Not sure if you're still interested, but we hit the same issue. The Windows image for WorkSpaces is still Windows Server 2016, which does support Docker but only Windows containers unless you're willing to install an out-of-date project to convert. WS 2019 does support it, so whenever Amazon upgrades their images, Docker will be supported on Windows.
For now, we just use Amazon Linux 2 and Docker works.

Docker on Windows 10 Home

My question is: If you use Docker tool box (that is required for windows 10 home to run Docker) you are essentially using a virtual machine (vm)?
If you are using a vm already the only reason to use docker from that point is to save on many more multiple instances?
Meaning if you only want 1 extra (guest instance): you can have a vm. Though, with docker (toolbox on windows 10 home) you would have 1 vm and it runs docker?
The only way that is useful is if you want many more instances as in: 1 vm + 1 docker or + 1000 more dockers?
Or am I missing something?
Yes, docker toolbox uses Oracle VirtualBox cause Windows 7, 8, and Windows 10 home cannot use Hyper V. And yes, If you are using a VM already the only reason to use docker from that point is to save on many more multiple instances but it also allows easy backup and deployment. But you are losing a decent amount of memory when running a VM and then even more when you are running docker.
So although Docker CE will tell you your Windows doesn't support Hyper-V, this isn't always the case (if you check in System Info you might have Hyper-V enabled, if you're on an Insider build or many builds on GPU computers after Anniversary update then you probably have Hyper-V on Windows 10 Home). There are a few workarounds until the Docker team addresses this issue.
You could use Docker from inside WSL (Windows Subsystem for Linux). Microsoft claims WSL accesses everything directly without Hyper-V so this should be theoretically at the same speed. Of course you can't use your GPU at all because of limitations with GPU passthrough on WSL, which you can ask to be resolved here.
You can also use Docker Toolbox as the other answer stated with Virtualbox, but this will be inherently much slower as you're virtualizing a container inside a virtualized container. You should be able to theoretically get GPU support through this, as well as other features e.g. GUI that you wouldn't be able to with WSL.
To answer the "usefulness" portion of the question:
It's also useful if you run code on a server, but need to develop/debug/update it. You want to test it locally, but to make sure the environment in which it executes is the same (to avoid unexpected, environment specific behavior), you use Docker both locally and on the server. In such a case, even though it's slow, I'll spin up a VM on my W10 Home laptop and run Docker in it.
The greatest feature of the Windows 10 Home May 2020 Update is Windows Subsystem for Linus 2. You can docker in it without the need for a complete virtual machine as in Virtual Box.
Install Docker Desktop that it will automatically indentify WSL2.

Kubernetes on single Windows Server Core node cluster

My understanding is that Kubernetes is more efficient UI for managing large clusters of containers, otherwise you're stuck with the command line. As of August 2018, It seems multi-platform support on Docker for Windows is still experimental (https://github.com/moby/moby/issues/33850, https://github.com/docker/for-win/issues/2079). Running any Linux image with the --isolation hyperv after pulling with the --platform linux switches doesn't work if not running on expermintal flag. How to enable to experimental flag on Docker for Windows Server core isn't documented. So setting up a single node kubernetes cluster on Windows Server 1803+ for QA purposes probably isn't well supported or even documented. Being an exclusive Windows shop, having to use a Kubernetes on Linux doesn't seem to make sense especially when the whole point of using Docker is to automate environments. What's the point of making environment configuration automatic when you still need to administer a Linux server.
How do you setup Kubernetes on Windows Server Core 1803 as a single node cluster?
You can quite easily set up one node Kubernetes cluster on Windows using minikube. You can use a native hypervisor (Hyper-V) if you want, but it is more recommended to use VirtualBox at this time.
In both cases, a Linux virtual machine will run on your server, and you will be able to access it with the native version of kubectl to manage the cluster.
Here are two manuals that can help you to do that (I can guess it will work on the Windows Server in the same way):
Tutorial : Getting Started with Kubernetes on your Windows Laptop with Minikube
Minikube on Windows 10 with Hyper-V
Here is an explanation of how you can use Windows server as a worker node in Kubernetes:
Using Windows Server Containers in Kubernetes
Kubernetes on Windows
Microsoft announces that the next version of Windows Server will have better support of Kubenetes and it's ready for testing:
Windows Server 2019 will feature Linux and Kubernetes support

Mesos slaves on windows server 2012r2, what are my options?

I have a cluster of machines running windows server 2012R2.
I would like to manage them with mesos.
To the best of my knowledge, microsoft is actively contributing to mesos (DC/OS) and will support containers natively on windows server 2016. Furthermore, it looks like there is another type of container flavour using hyper-v.
I can run my mesos masters on linux hosts. However I need my slaves on windows server 2012R2 hosts. It is not clear to me which technologies are already available (and production-ready) for my windows server version.
What are my options to use mesos to manage the resources of my windows server machines ?
Is the mesos-agent for windows (server 2012 R2) production ready ?
Can I use containers (hyper-v or docker) ? If not, is the resource isolation working in Windows (in linux you can use cgroups) ?
Can I run any framework I like or there are some not compatible with windows ?
Mesos version 1.0.0 was recently released that allows you to run the slave and launcher on windows. Not the master unfortunately. Its still Linux, but it doesn't really ever need to be Windows? The slave was the important bit for bringing Windows machines into the Mesos domain.
I've just been investigating using the Mesos-Slave on windows. Pleased to say that it appears to be working OK (this opinion is subject to change as I'm still testing it). Production ready is something any business would have to decide for themselves.
Mesos have always had their own isolation technology, interestingly they have redone their own containerizer implementation and this now takes a number of container image formats, so you can use your Docker images as well as a few others, so this is going to suit you. There was a good presentation on this at MesosCon https://www.youtube.com/watch?v=rHUngcGgzVM
Docker's been stealing the show to some extent. But if you use Mesos-Agent, Windows 2016 and its container technology (Docker) isn't needed and therefore it should run on Windows 2012. I've not got around to trying this yet but its definitely a test worth trying, it opens up deployment options. Anyone?
One thing to remember about containers, they are not VM's. The guest image must be a derivative of the hosts OS, you can't run a Linux image on a Windows machine. Causing me a headache, I can't use servernano at the moment, so my image sizes are 4Gb+, the initial deploy time is hours.

What's the difference between Docker for Windows and Docker on Windows?

Docker on Windows appears to be what's coming built into Windows Server 2016? and supports running Windows inside a Docker container and using Windows as a Docker container host. Does this support Linux? I don't think so, I think it only supports running Windows Docker containers. This also appears to be maintained by Microsoft.
Docker for Windows appears to be a separate install created by the Docker team to bring Linux Docker to Windows. So Windows can be the Docker host but all containers are still just normal Linux containers. Does this support Windows containers? I don't think so, I think it only supports running Linux Docker containers. This also appears to be maintained by Docker.
One other interesting note is that Docker Tools for Visual Studio appears to only support Docker Desktop for Windows and not Docker on Windows.
What I'm really looking for are the stated differences bettwen the two, some sort of good comparison. What features are each trying to acheive, where are they similar, where are they different. Will they always be different or will they ever come together?
Docker on Windows is a colloquial way to refer to just the Docker Engine running on Windows. I find it helpful to think of this as a Windows Container Host, so yes Windows containers only. This would be what you would run on a Windows Server 2016 machine. So maybe a better name is Docker for Windows Server which I believe people have used as well. I still prefer a Windows Container Host. Which means it only has the Docker Engine at the end of the day, doesn't even need to have any of the Docker clients (docker CLI, docker-compose, etc).
Docker Desktop for Windows is a product meant for running both Linux and Windows containers on Windows. It's not meant for a production environment, and instead is meant for a desktop/client SKU of Windows, hence the Windows 10 requirement. So you could think of this as Docker for Windows 10. Because DfW can run both container types, there are different configurations that it sets up on your machine:
When using Linux Containers, DfW creates a MobyLinuxVM with Hyper-V inside of which it runs Linux containers, transparently, as if they were running on the Windows 10 host.
When using Windows Containers, DfW installs the same components as Docker on Windows so that you have a Windows Container Host. You have the Windows Docker Engine setup now. This then allows you to run windows containers on a Win 10 client SKU.
Theoretically you could install DfW on Windows Server, I haven't tried so I don't know if this would fail, but why would you want to run Linux containers on a Windows Host in production? In production, you would have Linux Container Hosts that run linux containers and Windows Container Hosts that run windows containers, this would avoid overhead and simplify things.
Just to add on top of Wes's answer on Docker for Windows and few details about the experimental LCOW which is what you are looking for a side by side execution of Windows and Linux containers on the Windows host machine.
Right now there are two ways to run Linux containers with Docker for Windows and Hyper-V:
Run Linux containers in a full Linux VM - this is what Docker
typically does today.
Run Linux containers On Windows (LCOW) with Hyper-V isolation - this is a new option in Docker for Windows.
In the 1st approach, Docker for Windows windows will have docker daemon service on the Windows host machine as well as it will be available on Linux MOBY VM. So basically, you will have 2 different docker hosts. One which is running on your Windows Host Machine, Managing only Windows Containers and other which is running on your Linux Moby VM and Managing only Linux Containers.
It is important to note that, All Linux Containers will share a Single Linux Kernel on Moby VM and All Windows Containers will share Single Windows Kernel on Windows Host Machine.
Things are really getting interesting with the 2nd approach,
Linux containers with Hyper-V isolation run each Linux container in an optimized Linux VM with just enough OS to run containers. Each Linux container has its own kernel and its own VM sandbox. They're also managed by Docker on Windows directly.
The main difference here in this approach is that there is only one docker daemon service is running on Windows Host Machine and managing both Windows and Linux containers.
All Windows Containers will Share Single Windows Kernel while Each Linux Container will have its own Linux Kernel
To understand more in details, please refer
https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers

Resources