Option 1:
This should work for some systems, although distributions that use
systemctl
may have their docker.service
entry overwrite this setting, so you will need to use option 2.- If not already created, create the file
/etc/docker/daemon.json
- Add in the following:
{ "hosts": ["fd://", "tcp://0.0.0.0:2375"] }
- Restart docker and check the docker daemon process. It should have the additional -H flag like so:
$ sudo ps aux | grep dockerd root 31239 0.7 0.2 1007880 72816 ? Ssl 15:03 0:00 /usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375
Option 2:
- Edit the service by running:
sudo systemctl edit docker.service
- Add the following lines:
[Service] ExecStart= ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375
- Reload the service configuration:
sudo systemctl daemon-reload
- Restart the daemon:
sudo systemctl restart docker.service
- Use the last step of the previous option to test whether docker is listening on the network port
No comments:
Post a Comment
Thanks for contributing!! Try to keep on topic and please avoid flame wars!!