搜索:find / -name docker.service
结果:/lib/systemd/system/docker.service编辑:vi /lib/systemd/system/docker.service修改[Service]区ExecStart行为下面的内容
[Service]Type=notify# the default is not to use systemd for cgroups because the delegate issues still# exists and systemd currently does not support the cgroup feature set required# for containers run by dockerExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock --containerd=/run/containerd/containerd.sockExecReload=/bin/kill -s HUP $MAINPIDTimeoutSec=0RestartSec=2Restart=always在原本的ExecStart中添加tcp://0.0.0.0:2375
重启docker 守护进程和docker.service
systemctl daemon-reloadsystemctl restart docker.servicesystemctl start docker.service
