Cloud & DevOps · Question 23 · Medium
A container is started with docker run -p 8080:80 nginx. What does the -p 8080:80 option do?
- It forwards port 80 on the host to port 8080 inside the container
- It limits the container to 8080 MB of memory and 80% CPU
- It runs 80 copies of the container on port 8080
- It forwards port 8080 on the host to port 80 inside the container
Answer and explanation
Answer: D. It forwards port 8080 on the host to port 80 inside the container
Explanation: The format is -p hostPort:containerPort. Requests to the host's port 8080 reach nginx listening on port 80 inside the container.
Previous: What does this shell pipeline print? Ignore any leading spaces. · Next: What is blue-green deployment?
Practise cloud & devops
Try a fresh set of cloud & devops questions with an explanation after every answer, free and without signing up: Cloud & DevOps practice. Or sit a full placement mock test.
More cloud & devops questions
- The ability of a cloud system to add resources automatically when demand rises…
- Which octal mode gives the permissions rw-r----- (owner read and write, group…
- What does this shell pipeline print? Ignore any leading spaces.
- What is blue-green deployment?
- A Kubernetes Deployment is configured with replicas: 3. One of its Pods…
- A service promises 99.9% availability per 30-day month. What is the maximum…
- A request must pass through a web server and then a database server, and both…
- When does a cron job with the schedule 30 2 * * 1 run?
- What does this shell pipeline print?
- What does this shell command print?
More technical & programming practice
GenAI Basics · Pseudo-code · C Programming · Java · Python · Data Structures · Algorithms · Object-Oriented Programming
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge