docker配置远程登录

1.修改docker配置文件:


vim /lib/systemd/system/docker.service

修改:


ExecStart=/usr/bin/dockerd --containerd=/run/containerd/containerd.sock

2.修改daemon.json文件


vim /etc/docker/daemon.json

新增:


"hosts": ["0.0.0.0:2375","unix:///var/run/docker.sock"]

3.重载配置文件systemctl daemon-reload
4.重启dockersystemctl restart docker
大功告成!

猜你喜欢

转载自www.cnblogs.com/reboot777/p/11910452.html