修改docker0地址:
sudo ifconfig docker0 192.168.200.1 netmask 255.255.255.0
添加虚拟网桥
sudo brctl addbr br0
sudo ifconfig br0 192.168.100.1 netmask 255.255.255.0
更改docker守护进程启动配置
/etc/default/docker 中添加DOCKER_OPS值
-b=br0
sudo ifconfig docker0 192.168.200.1 netmask 255.255.255.0
sudo brctl addbr br0
sudo ifconfig br0 192.168.100.1 netmask 255.255.255.0
/etc/default/docker 中添加DOCKER_OPS值
-b=br0
本文标题:docker网络基础
本文链接:https://www.haomeiwen.com/subject/bysfyftx.html
网友评论