Skip to content

Glossary: Docker Basics

-p (publish)

Also written: -p 8080:80, --publish

A `docker run` option that connects a port on your computer to a port in the container, written `YOURPORT:CONTAINERPORT`. Without it, a container's server can't be reached from your browser.

Where the book teaches it

Related terms

PortPublish (a port)Host addresses (127.0.0.1, 0.0.0.0)