Default bridge vs user-defined bridge: what is the difference?

IntermediateConceptNetworking
Answer

User-defined bridges give automatic DNS resolution by container name (via the embedded DNS at 127.0.0.11), better isolation (only attached containers talk), on-the-fly connect/disconnect, and configurable subnets. The default bridge lacks name resolution and puts all containers together. Always create your own network.

docker network create appnet
docker run -d --network appnet --name db postgres:16
All Docker questions Roadmap: Docker & containers

More on Networking