Network modes: bridge, none and host
Select an icon to see what it is.
Step 6 of 6
Choosing a mode
Bridge isolates the container and lets you publish chosen ports. Host is the fastest and simplest, but gives up isolation and port control. None is for work that needs no network at all.
PrevNext
Summary
bridge: own namespace, own IP, -p worksnone: own namespace, loopback onlyhost: host's namespace, -p ignored
Try it yourself
Compare ip addr in the three modes. The host-mode nginx needs port 80 to be free on the host.
$ docker run --rm alpine ip addr$ docker run --rm --network none alpine ip addr$ docker run --rm --network host alpine ip addr$ docker run -d --name hostweb --network host nginx$ ss -ltn 'sport = :80'$ docker rm -f hostweb