I have read on some forums and tutorials that windows server offers a containers feature. I suppose this is a kind of "docker" but for windows.
I tried to add the feature in the server manager but the container item is not available.
Is it because a i need a special edition or version of windows server ?
Or is there a way to download the feature ?
The container feature is only available starting with Windows Server 2016 which is not released yet but you can test it with the technical preview versions of it
See the FAQ for it:
What are the prerequisites for Windows Server Containers and Hyper-V
Containers?
Both Window Server Containers and Hyper-V Containers require Windows
Server 2016. These technologies will not work with previous versions
of Windows.
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)
On a physical server with Windows Server 2019 Enterprise, I created Hyper V multiple VMs, both Servers and Win 10 Pro client.
I installed Docker Desktop (for Windows) on one of the Win 10 Pro VM clients.
The client virtual machine name is the Hyper-V Manager. I get an error when I try to start DockerDesktopVM, and the state remains off; any Docker command crashes Docker.
My questions:
Is there a conflict when nesting Hyper-V managers and VMs on the physical box?
How can you execute any docker commands when the DockerDesktopVM is off and cannot be started?
https://www.altaro.com/hyper-v/enable-nested-virtualization/
Q: How Do I Enable Nested Virtualization for Hyper-V Virtual Machines
A: Pass $true for Set-VMProcessor’s “ExposeVirtualizationExtensions” parameter
Set-VMProcessor <VMName> -ExposeVirtualizationExtensions $true
According to Docker FAQ
Docker Desktop is not supported in nested virtualization scenarios. It
might work in some cases and not in others.
https://docs.docker.com/desktop/faqs/general/#can-i-run-docker-desktop-in-nested-virtualization-scenarios
It should work even on AMD, according to MicrosoftDocs/Virtualization-Documentation issue 1276:
"Run Hyper-V in a Virtual Machine with Nested Virtualization"
Prerequisites
...
AMD EPYC/Ryzen processor or later
The Hyper-V host must be Windows Server 2022/Windows 11 or greater
VM configuration version 10.0 or greater
And:
What's new in Windows Server 2022
Nested virtualization is a feature that allows you to run Hyper-V inside of a Hyper-V virtual machine (VM).
Windows Server 2022 brings support for nested virtualization using AMD processors, giving more choices of hardware for your environments.
More information can be found at the nested virtualization documentation.
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.
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/
Presently is it possible to run docker client in Window Server2008 or 2012
in similar line as done in Windows 7 and 8 ?
I know they have been working on window container as well hyper V container which is supposed to release in next version in 2016. but is there any way to use docker client in it directly presently ?
Yes, if you can install VirtualBox on that Windows server, you can run the docker client (through boot2docker and its Tiny Core OS).
Since Windows Server 2008 is supported as a host server, the installation of boot2docker should be possible.
See also How to get Docker to run on a Windows System behind a corporate firewall?.