Docker Community Forums

Share and learn in the Docker community.

Toolbox or Docker for Windows on 2016 Server

docker

(Splatking) #1

I’m hoping someone can give me a clear answer. I’m trying to set up a Windows 2016 Server with docker, docker-machine and docker-compose. Should I be installing docker and docker Toolbox or ‘Docker for Windows’? The documentation is not clear if ‘Docker for Windows’ will run on a Windows 2016 Server. It says a requirement is Windows 2010.

The image I need to load will need to be in a Linux container.

Thanks.


(Shadowmint) #2

See https://github.com/docker/for-win/issues/448#issuecomment-276328342; it is possible to install ‘Docker for Windows’ on windows server now (in theory).

You can then use ‘DockerCli’ to swap into linux container mode, or the UI to do it manually.

Obviously this is a tech preview.

There is absolutely no support for running linux containers in production right now (Feb 2018) on windows server 2016. If that was your intention, forget it right now.

Maybe it’ll come eventually, but right now, basically, unless you’re setting up a test server, don’t bother.

So; tldr:

  • Ignore the invalid advice all over the place to install docker-EE. Don’t install nightly builds. Don’t install with preview mode and use --platform linux with an alpine image. Just. don’t. bother. None of it works.

  • Install the desktop version of docker for windows on your server (which must have hyper-V enabled) from https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe

  • Boot docker up, and let it go off and enable all the required windows features.

  • Swap to linux containers by right clicking on the icon tray icon and choose ‘Switch to linux containers’.

  • Profit!

Caveats:

  • You must install all windows server updates for docker to run.

  • I have two windows server 2016 machines; docker for windows installs on one, it doesn’t on the other. ¯_(ツ)_/¯. YMMV.

  • If you don’t have desktop access to the server, forget it.

  • Don’t use this in production. No seriously. It screws up quite a lot, especially with networking and volumes. You’ll probably have to just restart the server occasionally to make things work.