When You achieve limit of 30 created docker networks, You cannot add new app (which require their own network). casaOS during install app display error: “docker: all predefined address pools have been fully subnetted“
You can manually clear some unused:
# list all
docker network ls
# remove net. <NETWORK_ID> or <NAME>)
docker network rm <NETWORK_ID>
# remove all unused
docker network prune -f
I do not understand, why this limit was made so small. But solution is simply:
Create (or edit) on Host: /etc/docker/daemon.json
{
"default-address-pools": [
{
"base":"172.17.0.0/12",
"size":16
},
{
"base":"192.168.0.0/16",
"size":20
},
{
"base":"10.99.0.0/16",
"size":24
}
]
}
First two are default docker address pools, last is one of the private network.
Restart service docker:
sudo systemctl restart docker
Wait a while. And see webUI, 80 % of apps works, some are gray. You need to click on them for reload.
There is handy one-liner for list all containers and their networks- network size and container itself IP inside container:
sudo docker ps -aq | while read cid; do
cname=$(docker inspect --format='{{.Name}}' "$cid" | sed 's#^/##')
docker inspect --format='{{range $net,$cfg := .NetworkSettings.Networks}}{{$net}} {{$cfg.IPAddress}}\n{{end}}' "$cid" |
while read net ip; do
subnet=$(docker network inspect "$net" \
--format='{{if .IPAM}}{{(index .IPAM.Config 0).Subnet}}{{else}}-{{end}}')
printf "\e[1;34m%-40s\e[0m %-15s %-30s \e[1;32m%s\e[0m\n" \
"$cname" "$net" "$subnet" "$ip"
done
done
Tested for docker version 28.5.2, which is apt-hold for upgrade, until fix this issue.