✦ For everyone, free.

Practical knowledge for real and everyday life

Home

7.2.1.2 User Bridge Driver

A focused guide to User Bridge Driver, connecting core concepts with practical Docker and container operations.

The user bridge driver refers to an explicitly created, user-defined network using the bridge driver, distinguished from Docker's automatically provided default bridge network by offering automatic DNS-based name resolution and better isolation between unrelated groups of containers.

Creating a User-Defined Bridge Network

A user-defined bridge network is created explicitly, given a meaningful name reflecting its intended purpose.

docker network create --driver bridge app-network

Since bridge is the default driver, this is functionally equivalent to simply omitting --driver bridge entirely.

Why This Is Functionally a Bridge Network Like the Default

Despite being explicitly created rather than automatically provided, a user-defined bridge network uses the exact same underlying bridge driver as the default network — the meaningful difference lies in Docker's additional behaviors for user-defined networks specifically, not in the underlying driver mechanism itself.

docker network inspect app-network --format '{{.Driver}}'
docker network inspect bridge --format '{{.Driver}}'

Both report bridge as the driver, confirming the underlying mechanism is identical.

The Practical Behavioral Differences

The meaningful, practical differences come from Docker's additional treatment of user-defined networks — specifically, automatic DNS resolution between containers and stronger isolation from containers not explicitly attached.

docker network create app-network
docker run -d --name api --network app-network myapi:1.0
docker run -d --name db --network app-network postgres:16
docker exec api ping db

This succeeds on the user-defined network, in contrast to the equivalent scenario on the default bridge network, which would not provide this resolution.

Why the User-Defined Bridge Driver Matters

Understanding that a user-defined bridge network shares its underlying driver with the default bridge, while gaining meaningfully better behavior through Docker's additional handling, clarifies exactly why creating explicit, user-defined networks is the generally recommended practice for multi-container applications.