Junior — Middle
What network mode is used by default in Docker Compose?
sobes.tech AI
Answer from AI
By default, Docker Compose uses the bridge network mode. This means that a virtual network is created for each service, isolated from the host and other networks, but containers within the same Docker Compose project can communicate with each other by service name.
In bridge mode, containers get their own IP addresses within this virtual network, and ports can be forwarded to the host for external access.
If no other network mode is explicitly specified in the docker-compose.yml file, this mode will be used.