docker run -p 8080:80 nginx

Category: Docker

docker run -p 8080:80 nginx

Run container mapping host port 8080 to container port 80

Maps port 8080 on your host machine to port 80 inside the container, so you can access the service at localhost:8080.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.