1.先删除原有配置
# 停止docker服务
sodu service docker stop
sudo ip link set dev docker0 down
sudo brctl delbr docker0
sudo iptables -t nat -F POSTROUTING
2.创建新的网桥
sudo brctl addbr docker0
sudo ip addr add 192.168.100.0/24 dev docker0
sudo ip link set dev docker0 up
3.新增Docker配置文件
vi /etc/docker/daemon.json
{
"bip": "172.17.10.1/24"
}
4.重启Docker
systemctl restart docker 或者 service restart docker
网友评论