Docker compose network

Hello, colleagues!

I encountered a problem when setting up Docker networks on an Ubuntu Server 24.04 server running as a virtual machine on ESXi.
Docker is installed on the server, and the Docker service is actively running. When starting the docker compose, one of the networks cannot be created. All other networks are created without problems, but one specific network ends the creation with an error:
Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

Docker version 27.3.1, build ce12230

The output of docker network ls shows standard networks (bridge, host, none) and additional ones that are created for containers.

The ip link show docker0 command shows that the docker0 interface is in the state:
docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default.

The Docker service starts successfully, but there is a conflict when creating a subnet for one of the networks.

How can I solve the problem with the network and the docker0 interface to avoid a subnet conflict? Thanks in advance for your help!

Does this post help? https://forums.docker.com/t/docker-change-default-ip-range-for-all-and-new-containers/144474/8

If you change the bridge ip in /etc/docker/daemon.json (create the file if it doesn’t exist), make sure to stop the docker engine, remove the default bridge and docker0 interface, before restarting the docker engine again. It should re-create the interface and default bridge network.

2 Likes

Thank you so much! You saved me.
This helped me Docker - change default ip range for all and new containers - #8 by meyay

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.