启用TCP端口2375以便外部连接到Docker

Enable TCP port 2375 for external connection to Docker
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

Connect docker

docker -H tcp:0.0.0.0:2375 images
posted @ 2021-06-12 11:36  Herenwei_Wayne  阅读(377)  评论(0编辑  收藏  举报