Or even you can specify a specific IP range directly by providing all the necessary info in the docker-compose.yml file. Any container that gets connected to this network will get an IP in the range from 172.18.0.2 to 172.18.255.254. To avoid this problem, you need to specify the range of the bridge in the docker-compose.yml file, When running docker-compose up, it creates 2 bridge interfaces (other than docker0) with ip ranges 172.17.0.0/16 and 172.18.0.0/16, despite passing -bip192.168.1.5/24 -fixed-cidr192.168.1.5/24 to the main docker engine. Ensure the Pod address CIDR range that you specify is large enough to support your anticipated maximum cluster size.
A Pod address range of /17 results in a cluster than can support at most 511 nodes (32,766 usable IPs / 64 IP addresses per node). Docker version 1.12.6, build 7392c3b/1.12.6. As with GKE Standard, this results in a /26 range being provisioned per node, that is, 64 IPs. When you run docker-compose up, the following happens:Ī network called myapp_default is created.Īnd the IP range of the automatically created bridge is the default one, even if you have configured your docker engine not to use that range. Im also seeing the same behaviour as described by OP. Per docker compose document, you need to be careful when you use docker compose on a system which is configured not to use the default IP range(172.0.0.0/24) as docker0 bridge. the MACVLAN config is set to (IP example): Subnet - 192.168.90.0/24. I dont even know if this IP address can change some day if the container is loaded after another. $ systemctl restart docker Bridge automatically created by docker compose But the IP address is assigned by Docker, and not the DHCP of my router.