πŸ“Š Docker
Q. What is the purpose of the 'EXPOSE' instruction in a Dockerfile?
  • (A) To publish a container's port to the host
  • (B) To specify which ports the container will listen on
  • (C) To open a firewall port
  • (D) To map a container port to a host port
πŸ’¬ Discuss
βœ… Correct Answer: (B) To specify which ports the container will listen on

Explanation: The 'EXPOSE' instruction in a Dockerfile informs Docker that the container listens on the specified network ports at runtime. It does not publish the port to the host.

Explanation by: Rakesh Kumar
The 'EXPOSE' instruction in a Dockerfile informs Docker that the container listens on the specified network ports at runtime. It does not publish the port to the host.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
119
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Rakesh Kumar
Publisher
πŸ“ˆ
96%
Success Rate