nerdexam
CiscoCisco

200-901 · Question #535

200-901 Question #535: Real Exam Question with Answer & Explanation

The correct answer is C: EXPOSE 80. In a Dockerfile, the EXPOSE instruction declares which ports a container expects to listen on, indicating its intended network reachability from outside.

Application Deployment and Security

Question

Refer to the exhibit. An engineer is creating a Dockerfile for an application to run on a container. Application is a web application build on the Python Flask framework. Which port of the Dockerfile provides desired reachability to the application from the outside of the container?

Options

Explanation

In a Dockerfile, the EXPOSE instruction declares which ports a container expects to listen on, indicating its intended network reachability from outside.

Common mistakes.

  • A. RUN pip3 install Flask executes a command during the image build process to install Python dependencies, which is not related to network port exposure.
  • B. MAINTAINER User One ([email protected]) is a deprecated instruction used for setting metadata about the image author, unrelated to network ports.
  • D. COPY ./app copies application source code from the build context into the Docker image, which is a file system operation and has no direct bearing on network port reachability.

Concept tested. Dockerfile EXPOSE instruction

Reference. https://docs.docker.com/reference/dockerfile/#expose

Topics

#Docker#Dockerfile#Containerization#Network Ports

Community Discussion

No community discussion yet for this question.

Full 200-901 PracticeBrowse All 200-901 Questions