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
历史上的今天
12 月
16
- 2017CentOS 6.x-7.x系统升级内核 Docker最后更新:2022-11-25