0 votes
in Docker by
What is the purpose of the EXPOSE instruction in a Dockerfile?

A) To specify the port that a container should listen on

B) To specify the base image for the Dockerfile

C) To specify the user that should run the container

D) To specify the working directory for the container

1 Answer

0 votes
by

Solution:A

Explanation: The EXPOSE instruction in a Dockerfile is used to specify the port that a container should listen on. It does not actually publish the port, but instead informs Docker that the container will listen on that port when it is running.

Related questions

0 votes
asked Jul 1, 2022 in Docker by sharadyadav1986
0 votes
asked Aug 29, 2023 in Docker by JackTerrance
...