Is it possible to stop docker compose from creating a default network

The topic title is confusing, Please share your thoughts about why docker-compose would be responsible to create docker0.

If it is just about the default network a compose project deployment creates, then you should be able to prevent it like this:

networks:
  default:
    external: true
    name: none

Or you can customize its name like this:

networks:
  default:
    name: a-name-i-prefer-over-projectname_default

Note: In the service declaration, the network that need to be assigned would be still default. The changed name can be seen on docker engine level, e.g. with docker network ls

1 Like