1.暂停服务,删除旧网桥#service docker stop#
ip link set dev docker0 down#brctl delbr docker0
2.创建新网桥bridge0#brctl addbr bridge0#ip addr add 192.168.24.1/24 dev bridge0#ip link set dev bridge0 up
3.配置 Docker 服务,默认桥接到创建的网桥上
#echo ‘DOCKER_OPTS="-b=bridge0"‘ >> /etc/default/docker#service docker start
时间: 2024-10-02 04:48:31