$ ./guess_the_languageDevOps
DevOps · easy · #70

What does -p 8080:80 do?

docker run -d -p 8080:80 nginx
  1. Maps host port 8080 to container port 80
  2. Maps container port 8080 to host port 80
  3. Limits the container to 80 MB of memory
  4. Opens port 8080 in the host firewall
The format is host:container, and -d runs it detached.
Play DevOps ▸