← Quiz: Docker and Containers: all 10 questions
Quiz: Docker and Containers · Question 2 of 10
What does docker run -p 8080:80 nginx do?
What does docker run -p 8080:80 nginx do?
- A.Runs nginx on port 8080 inside the container
- B.Forwards port 8080 on the host to port 80 in the container
- C.Limits nginx to 80 MB of memory
- D.Runs 80 copies of nginx
Answer & explanation
Correct answer: Forwards port 8080 on the host to port 80 in the container
The format is host:container.
Can you get the rest right without peeking?
Take the timed Quiz: Docker and Containers quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →