Hi,
I’m new to docker so forgive me is the answer to my question sounds obvious.
I’d like to connect a docker-composed container to an existing network.
Following the documentation, I added the following statements to my docker-compose.yml :
version: '3'
services:
(...)
networks:
default:
external:
name: aeria
Aeria is an existing network.
The created container doesn’t seems to be connected to that network. I used docker inspect
and saw the the container is actually not connected to the right network :
"NetworkSettings": {
"Bridge": "",
"SandboxID": "f61e671c2ed4476f89bb5e602c8d7939bb7bf9cf8ef72fc46508fd324c518371",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {},
"SandboxKey": "/var/run/docker/netns/f61e671c2ed4",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "",
"EndpointID": "",
"Gateway": "",
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "",
"DriverOpts": null
}
}
What’s that “Bridge” network ? It’s not existing.
# docker network ls
NETWORK ID NAME DRIVER SCOPE
88ae769606f7 aeria devplayer0/net-dhcp:latest local
474eb6514fc5 aqua bridge local
b2d5e297fcc0 host host local
efac22fde510 none null local
I’m lost. Thanks for your help.
Matt