🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.Runs nginx on port 8080 inside the container
  2. B.Forwards port 8080 on the host to port 80 in the container
  3. C.Limits nginx to 80 MB of memory
  4. 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 →