5

I'm struggling with Docker Compose (version 2 or 3). I'm trying to add multiple subnets, so various services can reach each other, but get assigned IPv4 addresses from different subnets.

This is my current configuration:

networks: custom: driver: "bridge" ipam: driver: default config: - subnet: 10.10.10.0/16 gateway: 10.10.10.1 - subnet: 100.100.100.0/16 gateway: 100.100.100.1 

But I get the error:

Creating network "docker-setup-test_custom" with driver "bridge" ERROR: Pool overlaps with other one on this address space 
6
  • You can't have a subnet that overlaps another subnet. Commented May 3, 2019 at 11:59
  • But they don't overlap? Commented May 3, 2019 at 12:23
  • 2
    It can't overlap any other Docker network, including ones previously created. Commented May 3, 2019 at 12:49
  • 3
    Ah, found some old networks in docker network list. Thank you. Commented May 3, 2019 at 12:53
  • Now I'm getting a new error: ERROR: bridge driver doesn't support multiple subnets. Commented May 3, 2019 at 12:53

1 Answer 1

1

You can specify the network config as specified in the documentation:

https://docs.docker.com/compose/networking/#specify-custom-networks

Otherwhise I believe all containers in the same docker compose can communicate without network config.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.