1、编辑docker文件:/usr/lib/systemd/system/docker.service
[root@localhost ~]# vim /usr/lib/systemd/system/docker.service
文章源自小柒网-https://www.yangxingzhen.cn/7721.html
# 修改ExecStart行为下面内容文章源自小柒网-https://www.yangxingzhen.cn/7721.html
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375
或者
文章源自小柒网-https://www.yangxingzhen.cn/7721.html
[root@localhost ~]# sed -i 's#/usr/bin/dockerd#& -H tcp://0.0.0.0:2375#' /usr/lib/systemd/system/docker.service
文章源自小柒网-https://www.yangxingzhen.cn/7721.html
文章源自小柒网-https://www.yangxingzhen.cn/7721.html
2、重新加载docker配置
文章源自小柒网-https://www.yangxingzhen.cn/7721.html
[root@localhost ~]# systemctl daemon-reload
文章源自小柒网-https://www.yangxingzhen.cn/7721.html
[root@localhost ~]# systemctl restart docker文章源自小柒网-https://www.yangxingzhen.cn/7721.html
3、查询端口文章源自小柒网-https://www.yangxingzhen.cn/7721.html
[root@localhost ~]# netstat -lntup文章源自小柒网-https://www.yangxingzhen.cn/7721.html
若文章图片、下载链接等信息出错,请在评论区留言反馈,博主将第一时间更新!如本文“对您有用”,欢迎随意打赏,谢谢!


评论