← 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?
- A.Sets the app's server.port
- B.Limits memory to 8081 MB
- C.Starts two containers
- 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 →