docker报错could not find an available, non-overlapping IPv4 address
作者:Sec-Labs | 发布时间:
常见问题
docker-compose up出现以下报错
Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
解决方案
您可以修改/etc/docker/daemon.json
{
"registry-mirrors": [ "https://:5000" ],
"bip": "172.17.0.1/24",
"default-address-pools": [
{
"base" : "172.17.0.0/24",
"size" : 24
}
]
}
譬如修改为
{
"registry-mirrors": [ "https://:5000" ],
"bip": "172.17.0.1/24",
"default-address-pools": [
{
"base" : "172.17.0.0/24",
"size" : 24
},
{
"base" : "172.16.0.0/24",
"size" : 24
},
{
"base" : "172.15.0.0/24",
"size" : 24
}
]
}
然后重启docker服务
service docker restart
继续启动容器就会发现已经正常了