🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Docker: all 10 questions

Quiz: Docker · Question 7 of 10

What does -p 8081:8081 in docker run do?

What does -p 8081:8081 in docker run do?

  1. A.Sets the app's server.port
  2. B.Limits memory to 8081 MB
  3. C.Starts two containers
  4. D.Publishes container port 8081 on port 8081 of your machine
Answer & explanation

Correct answer: Publishes container port 8081 on port 8081 of your machine

The left number is the host port; the right one is the container port.

Can you get the rest right without peeking?

Take the timed Quiz: Docker quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →