Docker 开启远程连接_04
-
[root@centos]# vi /usr/lib/systemd/system/docker.service
- 最初
-
修改:
- 把 ExecStart=/usr/bin/dockerd -H fd://--containerd=/run/containerd/containerd.sock
- 改为:
- ExecStart=/usr/bin/dockerd -Htcp://0.0.0.0:2375 -H fd:// --containerd=/run/containerd/containerd.sock
-
刷新配置文件并重启
- systemctl daemon-reload && systemctl restart docker
-
远程客户端测试:
- docker -H 111.**..:2375 image ls