See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.json
file in/etc/docker
:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
-
Add
/etc/systemd/system/docker.service.d/override.conf
[Service] ExecStart= ExecStart=/usr/bin/dockerd
-
Reload the systemd daemon:
systemctl daemon-reload
-
Restart docker:
systemctl restart docker.service
Hi,bro. I'm trying to add the proxy option for the dockerd.json,there is some problem for me.
I had read the docs of how to set the value of daemon-proxy,but the error still exsit.
unable to configure the Docker daemon with file /var/packages/ContainerManager/etc/dockerd.json: the following directives don't match any configuration option: http-proxy, https-proxy, no-proxy
{"data-root":"/var/packages/ContainerManager/var/docker","log-driver":"db","proxies":{"http-proxy":"http://127.0.0.1:7890","https-proxy":"http://127.0.0.1:7890","no-proxy":"localhost,127.0.0.1"},"registry-mirrors":[],"storage-driver":"aufs"}
can you give me some help? appreciate it.