一
/etc/docker/daemon.json
添加hosts
javascript
{
"hosts": [
"fd://",
"tcp://0.0.0.0:2375"
]
}
二
/lib/systemd/system/docker.service
去除:-H fd://
bash
ExecStart=/usr/bin/dockerd --containerd=/run/containerd/containerd.sock
三
systemctl daemon-reload
service docker restart
四
bash
curl http://localhost:2375/version