Docker Community Forums

Share and learn in the Docker community.

Default Network interfering


(Osmorgan) #1

Hello, i have an issue where the network created by a compose build is interfering with connections to one of our servers. Im not defining a network in my compose yml, and the build is creating a network with the below config

“Scope”: “local”,
“Driver”: “bridge”,
“IPAM”: {
“Driver”: “default”,
“Options”: null,
“Config”: [
{
“Subnet”: “172.18.0.0/16”,
“Gateway”: “172.18.0.1/16”
}
]
},

how do i change this to not use this gateway please? ive been unable to get the correct syntax for defining my own network in the compose yml.

any help appreciated!
Thanks!


(Osmorgan) #2

please ignore this request… i have found the solution

networks:
mynetwork:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16
ip_range: 172.28.5.0/24
gateway: 172.28.5.254