Docker & Kubernetes · Module 03
Docker Networking
Pick the right network driver, publish ports safely, manage user-defined bridges and know when to use host, overlay, macvlan and none.
What you will learn
- Choose the bridge, host, overlay, macvlan or none driver for a situation
- Publish ports with -p and limit the listening interface
- Create user-defined bridges and attach or detach running containers
- Explain how host, overlay, macvlan and none networks behave
Lessons
- Network drivers and when to use them
Docker ships bridge, host, none, overlay and macvlan; pick a driver by who the container needs to talk to.
- Bridge networks and port mapping
Containers on a bridge have private IPs; publish ports with -p so the host and the outside world can reach them.
- Managing user-defined bridges
Create networks, attach containers at creation or while running, detach them and remove networks in the right order.
- Host, overlay, macvlan and none
Four special drivers — share the host network, span several hosts, plug straight into the LAN, or switch networking off.