Difficulty: Advanced
Explain the common Docker networking drivers.
1. **Bridge (Default)**: Private network on the host. Containers communicate via IP or name if on the same user-defined bridge. 2. **Host**: Container shares the host's network namespace directly (no isolation, best performance). 3. **Overlay**: Connects multiple Docker daemons together (used in Swarm). 4. **None**: Disables all networking for the container.
docker network create my-net
docker run -d --name db --network my-net redis
docker run -it --network my-net alpine ping db
Standard bridge networking allows 'alpine' to find 'db' by its container name.
Bridge, Host, Overlay, None