Publish a container port to the host.
Section: Containers
Publish a port
bash
bash
docker run -d -p 8080:80 nginx:latestExplanation
Maps host port 8080 to container port 80.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Containers