1. First Principles: What Is Docker Networking?

Docker networking is the system that allows:

Under the hood, Docker uses:

Every container gets its own network namespace (isolated network stack).


2. What Happens When You Run Docker Compose

When you run:

docker compose up

Docker Compose automatically:

  1. Creates a bridge network:

    <project_name>_default
    
  2. Connects all services to it.