How to join the default bridge network with docker-compose v2?

Adding network_mode: bridge to each service in your docker-compose.yml will stop compose from creating a network.

If any service is not configured with this bridge (or host), a network will be created.

Tested and confirmed with:

version: "2.1"

services:
  app:
    image: ubuntu:latest
    network_mode: bridge

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)