ExamGecko
Question list
Search
Search

Question 422 - 200-901 discussion

Report
Export

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?

A.

PORT 5000

Answers
A.

PORT 5000

B.

LISTEN 5000

Answers
B.

LISTEN 5000

C.

EXPOSE 5000

Answers
C.

EXPOSE 5000

D.

OPEN 5000

Answers
D.

OPEN 5000

Suggested answer: C

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 5000.

Dockerfile

Reference: Dockerfile EXPOSE

asked 07/10/2024
Cheikh Ndiaye
34 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first