Docker-ce edge can't set experimental to true

I’m trying to expose docker metrics for prometheus, but it’s not working and I suspect that it’s because I can’t set experimental parameter to true.

I’m running docker-ce edge and have set experimental to true in /etc/docker/daemon.yml, restarted docker, but when I query experimental, it returns false.

{
  "debug" : true,
  "metrics-addr" : "0.0.0.0:9323",
  "experimental" : true
}

[root@foo docker]# docker --version
Docker version 17.09.0-ce, build afdb6d4
[root@foo docker]# rpm -qa | grep docker
docker-ce-17.09.0.ce-1.el7.centos.x86_64
[root@foo docker]# docker version -f ‘{{.Server.Experimental}}’**
false

Is this a bug, or am I doing it wrong?

(By the way, this works fine on mac osx using docker 17.06.2-ce, build cec0b72)

Is there another way to set it to true?

Hi,

You mention setting that in daemon.yml.

You can start dockerd in debug mode by using the --debug or -D flag. You can also set the experimental flag in daemon.json.

You also mention docker for mac; you can set that via the UI (Preferences -> Daemon -> Advanced), which is slightly different from crafting a daemon.json file directly on the file system.

Best of luck