Docker network conflicts with local networks

Docker Compose Network Conflicts

Compose default network conflicts with the local network

To fix this issue, we should config the specified network by compose file.

Here is a sample.

1
2
3
4
5
6
7
8
9
10
11
12
services:
# ...
networks:
net1:
ipam:
config:
# if not set, the default gateway is 172.66.99.1
- subnet: 172.66.99.0/24
# or set a gateway
# - subnet: 172.34.0.0/16
# gateway: 172.34.0.1