I need to use Docker / Windows containers on Windows 2016 Server and prepare it Windows applications to run on it.
Configuring Windows via Powershell just is not as convenient though as it is on Ubuntu, especially if you never worked with Windows Server really and need to learn all the Powershell commands ;)
Is there a way to access a Windows Container via GUI?
It's possible with Docker, Ubuntu, VNC:
Can you run GUI apps in a docker container?
Wondering if anything similar can be done for Windows Containers?
(I am working on-premise, not using Azure. Found a similar but unanswered question here: https://stackoverflow.com/questions/32721422/windows-server-containers-azure-how-to-create-a-container-with-gui)
Thanks.
== Update ==
RDP is definitely not an option as per February 2016 - not sure if they plan to support it in the final release?!
https://msdn.microsoft.com/en-us/virtualization/windowscontainers/about/work_in_progress#remote-desktop
Remote Desktop
Windows Containers cannot be managed/interacted with through a RDP session in TP4.
So far I managed to have at least a decent file explorer by using Midnight Commander, but still command line on Windows is not much fun.
in this video MS-container-developer Taylor Brown says that they break up with RDP from TP3 to TP4 and will very probably do not support RDP in RTM Version Server 2016:
https://channel9.msdn.com/Events/TechNetVirtualConference/TechNetVC2016/Day-3-Containers-Session-with-QA
Update as of Dez. 2018:
Server 2019 is out and RDP is still not possible / supported for all container images. (of course it does not make any sense for nano images)
check this nice intro to what has changed: https://stefanscherer.github.io/docker-on-windows-server-2019/
to have a somewhat complete overview, it should be mentioned that there are some hacks out in the wild, that may RDP make work in some images and setups, e.g.:
https://withinrafael.com/2018/03/09/using-remote-desktop-services-in-containers/
Related
I'm in a situation where:
I have no choice of server OS (Windows Server 2016 Build 14393).
And no choice of container OS (I need Linux Containers).
And I don't need Docker EE (Enterprise), CE (Desktop Edition) will do.
The easiest way to get Linux containers without hacky workarounds is to download Docker Community Edition 2.0.0.3 2019-02-15
Link: https://download.docker.com/win/stable/31259/Docker%20for%20Windows%20Installer.exe
Page with all versions: https://docs.docker.com/docker-for-windows/release-notes/
Simply download/copy the file to the Windows Server 2016 machine and run it.
It can also run offline for air gapped systems.
Uncheck the "Use Windows containers" during setup. Unchecked by default.
You will get a message after installing saying that windows so and so is deprecated. Click OK.
Log out and log back in.
If you hadn't installed Hyper-V it'll prompt you to do it automatically. Allow it, let it finish and restart. You're good to go now.
I've tested this by running several Linux containers, it works fine. If I'm missing something do share for the benefit of others. The downside is you cannot update to a later version of Docker.
Update:
Disclaimers:
This can help you avoid the hardware limitations and complexities of using LCOW with Docker-EE for Windows.
It is more recent than the latest official version of LCOW available.
This won't let you run Windows and Linux containers in parallel. You can only run one or the other.
This also won't start docker automatically at startup (not until you login). To start docker without login you'll need to add Docker Desktop Executable to Windows Task Scheduler and configure it to run on startup whether user is logged in or not. You'll have to provide an account for it (ideally a service account, or an account with a permanent password)
I am exploring docker for one of my company project. In this project I need to run the MemCached on CentOS and I prefer to run this in a docker container. I have successfully able to run this on Windows 10 machine with Docker Community Edition installed. But our project needs Windows Server 2019 in production and I want to run the container of same image (MemCached on CentOS) on windows server 2019. I googled a lot and found a link for running Linux Containers on Windows Server 2019. But as per the above link we are installing docker package in Preview version. I believe that this Preview version I should not use in Production. Is my understanding is correct or not?
Also is there any other stable released way to run Linux containers on Windows Server 2019.
Thanks in advance.
As per the Preview version you can remove the -RequiredVersion preview tag and then install. The process will install Docker Enterprise Edition on Server 2019 and not the CE version as the one for WIN 10.
If the container you want to run is a Linux container then you may face some tough times reason being
The containers(linux) runs on Server 2019 using LCOW way and the LCOW way is an experimental feature.
You said that you want to run container in Production environment and I would say not to use and experimental feature for Production.
Incase you need to run the containers on a server edition of Windows ie Server 2016 or Server 2019 you can go with the Docker CE (ie the same .exe that works on Win 10).
One important point to note is that on server 2016 all the docker versions are not supported.
Docker 2.0.0.31259 is the supported version of Docker on Server 2016.(Latest Docker 2.1.0.3 does not work on server 2016 but it works on Server 2019
Note : I face the same issues as you face ie you want the run the containers on Server 2019. The above are my findings so far. There is no clarity from windows side about how to run docker containers. Please refer to my answer :Here for better understanding
I'm struggling with the same issue for some time, and for me the only working combination of Windows Server and Docker that can effectively run with Linux containers is Windows Server 2019 Standard Edition with an edge release Docker Desktop Community 2.1.3.0 published on 2019-09-16.
The link to read about edge releases and to download them is:
https://docs.docker.com/docker-for-windows/edge-release-notes/
In my case, there was also an issue of nested virtualization, since my Windows Server is installed on VMware machine, and Docker requires Hyper-V inside Windows Server in order to work.
Fixed that issue according to instructions provided here:
https://doitfixit.com/blog/2014/03/06/qhyper-v-components-is-not-runningq-nested-in-vmware-workstation/
as far as my understanding goes, it is experimental feature, however it can be done and works quite OK.
The only requirement is that this feature works on server with hypervisor enabled.
Follow this link: https://www.altaro.com/msp-dojo/linux-containers-windows-server-2019/ for further instructions on how to set it up.
We have a large application with several parts running on a Windows VM and I am trying to evaluate Docker containers for our application deployment. Is it possible to create a base docker image from an existing Windows VM already running my application? (I know this can be done using Dockerfile but I am looking for a quick way to create the image)
https://docs.docker.com/engine/userguide/eng-image/baseimages/
Above link describes creating image from working machine for Linux, but I am looking for something similar for Windows.
The only base image for Windows that I know are the ones proposed by Microsoft, for Windows Server 2016 or 1709.
See "PoC: How to build images for 1709 without 1709"
That means you can translate any Widows VM into an image.
You would need:
a Dockerfile
the right Microsoft base image, which would represent a Windows server one.
Typically:
microsoft/nanoserver,
microsoft/windowsservercore
If you application only runs on a Windows VM, you need to make sure it can be installed and run on one of those base Windows images.
EVen though you are using a VM Windows server 2016, you would not be able to quickly "capture its state": you need a Dockerfile to describe what you want your Widows container to run.
No it's not possible. You have some stuff like Vm2Docker etc but all it does the same thing you will do manually that is enumerate features installed and create some artifacts for you.
But it's not possible to do for third party application as you mentioned. You'd have to disassemble it and figure out how to scripts to install it.
I am looking for a way to have a Development environment of Production web server for our Developers/testers created using Docker on windows.
I have windows server 2016 OS installed on a Physical server (not VM), and want to dockerize it so that Dev team can make changes on it first and once they confirm all working fine then same changes will be done on production web server.
Thanks,
RK.
I've been asked to research Docker. The question that I cannot get a definitive response to is "can you run Docker on Windows in production?".
I keep seeing "Docker image containers can run natively on Linux and Windows. However, Windows images can run
only on Windows hosts and Linux images can run only on Linux hosts, meaning a host server or a VM."
I'm not interested in running containerized windows applications (.net). We have Spring Boot (java) applications & are creating a microservices architecture. These containerized apps. don't need an OS running in the same container.
We also need an orchestration engine like Kubernetes and its unclear if this is something that can run in production on windows either.
I've been fighting the good fight trying to get deployment environments switched to Linux but that's a loosing battle at this point.
Citing the docs:
Welcome to Docker for Windows!
Docker is a full development platform for creating containerized apps,
and Docker for Windows is the best way to get started with Docker on
Windows systems.
Take this literally. It's meant by the vendor as a dev tool to develop your Docker environment on Windows, not a production environment. To run it in production, they expect a Linux host.
It's not clear if the OP is asking "Can I run Docker on Windows in production" (like from a licensing perspective), or "should I run it" (like from an experience perspective.) I have an answer that should address both points.
It's indeed interesting to note first that as I write this, all the answers and comments so far are from 2018 or (like the question) 2017.
Here's at least one 2019 post on the topic from Docker (including listing clients running in production, so it addresses both points):
https://www.docker.com/blog/5-reasons-to-containerize-production-windows-apps-on-docker-enterprise/
And while the title refers to Docker Enterprise, the article does say "Hundreds of enterprises now run Windows container nodes in production", without that Enterprise caveat.
Even so, folks who may "not want to pay to run Docker Enterprise" should note that Windows 2016 and 2019 include a license of Docker Enterprise, free. (As for the recent upheaval of Docker where the Enterprise product was sold to Mirantis, there's no indication yet that will change the included Windows licensing of it.)
Still, I realize that the OP and other readers may seek still more (documented) evidence of production Docker deployment on Windows. I'll leave that for others to elaborate. Just didn't think this should stand here without anything more recent than July 2018.
Check out this blog, it quotes "Windows Server 2016 is the where Docker Windows containers should be deployed for production".
First of all, I suspect this question is rather stale after 3 years. I don't know if you are still struggling with the problem, I would love to hear your experience and the route you had taken.
This is probably a biased answer but I will try to answer with my experience. Like you, we have also lost the good fight to persuade our client to use a Linux server. We have 2 metals and a small bunch of virtual machines running Windows Server 2019 - Server version 1809 (Which is not the cutting edge, but the most recent stable version) It was indeed an improvement on top of WS2016. However it still had some problems. The major problem was with the docker swarm. The overlay networking with routing mesh was not working properly. So we had to fall back to containers with docker-compose and manual service discovery, which kinda beats the purpose of docker.
That being said, the problem with the Swarm network could be because of the fact that we are using virtual machines and Hyper-v switches. On top of that, we had no direct access to host network and we had to jump through some bureaucratic hoops whenever we require changes in the network, which got super old super fast when we want to test stuff. Additionally, we did not have Active Directory because of our lack of confidence to network. I am still not sure if DCs would play with docker in a virtual environment. Still not having AD was manageable since we did not have many machines.
Another problem was that we did not have nested virtualization (i.e. cannot run moby) due to CPU issues, and WSL2 with support for Docker is not available on WS19 LTSC editions. So I had to write our own images for many stuff that we use. Like Jenkins, Redis, etc. You can find the dockerfiles here if interested But obviously keeping them up to date and tidy was a huge work and I did not have much time to invest.
Performance-wise, we seemed to have no issues but we did not really make a comparative analysis.
All in all, I love Docker, it is a great product. But after this project I am thinking not to touch Docker on windows in a production environment with a 10 foot pole. In fact, I don't know if I will ever use a Windows machine as production environment in the future. It is cool to have it in development though.
My understanding is that Containers on Windows Server should be fine for production while Containers on Windows Desktop should be only for dev and test, not production. I saw one post "MICROSOFT SOFTWARE SUPPLEMENTAL LICENSE FOR WINDOWS CONTAINER BASE IMAGE" https://learn.microsoft.com/en-us/virtualization/windowscontainers/images-eula, not sure how this one is related to this question?
I can highly recommend not to use Docker Desktop for Windows in Production.
The host machines (Windows 10 Pro) where configured to restart everyday at a certain time and the Docker Container where Linux containers which as recommended where using the WSL2 based engine.
I was testing it on 20 devices for a over one year now and from 20 Pc's had at least 5 now the problem that Docker Desktop cannot be initialized. Which means that Docker Desktop is not starting anymore until you remove some folder(s) in %APPDATA% but when you do so it worked only 3 out of 5 times for me that Docker Desktop was able to start after that. One time needed to reinstall Docker Desktop the remaining One I needed to reload all the docker images and configure them again. Most of the issues seemed to have been a result of a power cut.
Most annoying are the updates from my perspective, because from one to the other version all images and running containers where gone and I needed to reconfigure them, happend with 2 Version in the past but not on all computer.
The Linux machines on the other hand no issues.
I notice that nvidia has support for GPU and Docker, but I believe this is only for linux at the moment. Has anyone got it working on windows 10?
In particular, I'm hoping to get access to it for machine learning applications.
https://github.com/NVIDIA/nvidia-docker
Since Docker uses Virtualbox to work on Windows, and Virtualbox will not expose CUDA to the guest without PCI passthrough, I think it will not be possible to do this as you are thinking.
For 2018-01, it looks like no one was able to make it work yet.
Moreover, they say (#29, #197) it would require DDA (PCI passthrough), so, theoretically it should be possible to make it work on Windows Server 2016, but not on Windows-10. But even for Windows Server 2016 - I've not found any success stories.
Seems that in Windows 10 Docker does not uses Virtualbox to work in Windows. So it may work.
https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10