Please enable Javascript to view the contents

Docker配置默认网桥ip地址

 ·  ☕ 1 分钟

记录一下

修改docker默认桥接网络ip段

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
cat > /etc/docker/daemon.json <<EOF
{
  "registry-mirrors": ["https://dyucrs4l.mirror.aliyuncs.com"],
  "bip": "169.254.0.1/24",
  "max-concurrent-downloads": 10,
  "log-driver": "json-file",
  "log-level": "warn",
  "log-opts": {
    "max-size": "20m",
    "max-file": "2"
  },
  "default-address-pools": [
    {
      "base": "100.250.0.0/16",
      "size": 24
    }
  ],
  "storage-driver": "overlay2"
}
EOF

重启docker

1
systemctl restart docker

参考文档 dockerd

分享

ysicing
作者
ysicing
云原生爱好者