- Use the command
sudo systemctl edit docker.service
to open an override file fordocker.service
in a text editor. - Add or modify the following lines, substituting your own values.
[Service] ExecStart= ExecStart=/usr/bin/dockerd -H fd:// -H tcp://127.0.0.1:2375
- Reload the
systemctl
configuration.$ sudo systemctl daemon-reload
- Restart Docker.
$ sudo systemctl restart docker.service