1

To be able to run Linux containers on a Windows 2016 host we followed this tutorial. The issue we're having is that we can't seem to enable the experimental features. In the docs it says:

To enable experimental features in the Docker CLI, edit the config.json file and set experimental to enabled.

File C:\ProgramData\docker\config\config.json:

{
  "experimental": "enabled",
  "debug": true
}

After restarting the Docker service (Restart-Service docker) and running docker info we sill see the flag Experimental: false:

 Operating System: Windows Server 2016 Standard Version 1607 (OS Build 14393.3686)
 OSType: windows
 Architecture: x86_64
 Docker Root Dir: C:\ProgramData\docker
 Experimental: false

How is it possible to enable the Docker experimental features on a Windows Server 2016?

Even when I try set the environment variable and restart powershell and the docker service it doesn't register within docker info:

[Environment]::SetEnvironmentVariable("DOCKER_CLI_EXPERIMENTAL", "enabled", "Machine")

After logging in to docker with docker login the file "C:\Users\bob\.docker\config.json". When adding the key it's still not registered after service restart:

{
  "auths": {
    "https://index.docker.io/v1/": {
      "auth": "xxxxx"
    }
  },
  "HttpHeaders": {
    "User-Agent": "Docker-Client/19.03.5 (windows)"
  },
  "experimental": "enabled",
  "debug": true
}
3
  • have you tried setting experimental to true instead of enable. Json boolean operator use true false, as seen in debug key just below. Commented Jul 3, 2020 at 19:27
  • Ypu, tried that, no luck. Commented Jul 6, 2020 at 6:14
  • Just saw that you're on Build 1607. Unfortunately i'm also stuck on the same road as you are :( Commented Jul 7, 2020 at 3:11

5 Answers 5

6

From all of the answers above, only adding --experimental parameter in services -> docker -> Path to executable worked. You can change it using regedit.exe

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\docker

key ImagePath value "C:\Program Files\docker\dockerd.exe" --experimental --run-service if you have any other starting parameters you should keep them.

You can do it using sc (in powershell sc.exe)

Sign up to request clarification or add additional context in comments.

Comments

4

You put your configuration to a file with name config.json. But according to docs correct file name is daemon.json.

Full path to config file must be: C:\ProgramData\docker\config\daemon.json

Comments

1

I followed the Canonical tutorial for linux containers on Windows, and got stuck trying to pull the correct ubuntu (linux not windows) image (then found your question about setting experimental). If you ask the dockerd.exe for parameters it will accept (dockerd.exe --help) one of the options is --experimental.

Setting --experimental on the dockerd invocation worked for me.

If you can configure the invocation of your daemon with --experimental (rather than inside a configuration file), this could solve your problem.

2 Comments

I tried your suggestion on Windows but no luck &'C:\Program Files\Docker\docker.exe' --experimental. The switch --experimental is also not available in the help.
oh, i supplied that parameter to the docker daemon, not on the docker client. i.e. dockerd.exe no docker.exe, so you have to modify the docker daemon inside services
0

Try setting the environment variable with:

[Environment]::SetEnvironmentVariable("DOCKER_CLI_EXPERIMENTAL", "enabled")

This worked on my linux cluster where specifying User or Machine seemed to result in the variable being ignored..

Comments

0

I found out that it simply won't run on Windows Server 2016 as stated here:

Docker Desktop has changed its way to leverage WSL2 for running Linux containers on Windows 10. The plan for Docker EE is unclear as Docker Inc. has sold it to Mirantis. https://github.com/docker/for-win/issues/6470#issuecomment-633883063

So if you plan to run both Linux and Windows containers in production, you may want to look for other options, such as Kubernetes.

It turns out the Linux Containers on Windows (lcow) Server is a preview feature of both Windows Server, version 1709 and Docker EE. It won’t work on Windows Server 2016 of which the version is older than 1709.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.