Skip to content
Opsfolk

Storage and networking, topic 17 of 41

Publishing ports

A port a container listens on is reachable from other containers on its network, but not from outside, until you publish it: -p 8080:80 sends the host's port 8080 to the container's port 80.

By default a published port listens on every interface of the host, and on Linux Docker's firewall rules can make it reachable even past a firewall such as ufw. Bind to 127.0.0.1:8080:80 for a port only you should reach.

On Opsfolk

Nothing of ours for this topic yet: an article is on its way.

Elsewhere

Your progress