1、打开修改 daemon.json 文件进行修改
vi /etc/docker/daemon.json
增加 bip 配置,示例如下:
{ "bip": "192.168.1.1/24" }
注意,此处必须填写一个有效 ip 地址,否则会导致 docker 无法启动,提示:failed to allocate gateway Address already in use
参考:https://blog.csdn.net/hknaruto/article/details/120504471
2、重启 docker 即可生效
systemctl daemon-reload systemctl restart docker
参考:ChatGPT
标签:bridge,daemon,docker0,网段,修改,json,docker From: https://www.cnblogs.com/xwgli/p/17384169.html