200-901 · Question #596
Refer to the exhibit. A developer needs to create a Docker image that listens on port 5000. Which code snippet must be placed onto the blank in the code?
The correct answer is C. EXPOSE 5000. The EXPOSE instruction in a Dockerfile informs Docker that the container listens on the specified network ports at runtime. EXPOSE Instruction: It does not publish the port but indicates to Docker that the application inside the container uses this port. Listening Port: The Docke
Question
Refer to the exhibit. A developer needs to create a Docker image that listens on port 5000. Which code snippet must be placed onto the blank in the code?
Exhibit
Options
- APORT 5000
- BLISTEN 5000
- CEXPOSE 5000
- DOPEN 5000
How the community answered
(25 responses)- A4% (1)
- C96% (24)
Explanation
The EXPOSE instruction in a Dockerfile informs Docker that the container listens on the specified network ports at runtime. EXPOSE Instruction: It does not publish the port but indicates to Docker that the application inside the container uses this port. Listening Port: The Docker container will be configured to listen on port 5000 using EXPOSE
Topics
Community Discussion
No community discussion yet for this question.
