S

Shiva Ram • 30.44K Points
Instructor I

Q. What is the purpose of the EXPOSE instruction in a Dockerfile?

  • (A) To open a port on the host machine
  • (B) To document which ports are used by the container
  • (C) To publish a container's port to the host
  • (D) To map a container's port to a specific host port
  • Correct Answer - Option(B)
  • Views: 18
  • Filed under category Docker

Explanation by: Shiva Ram
The EXPOSE instruction documents which ports are intended to be used by the container.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics