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

  • (A) To specify the base image
  • (B) To define the default command to run in the container
  • (C) To set environment variables
  • (D) To copy files into the container
πŸ’¬ Discuss
βœ… Correct Answer: (B) To define the default command to run in the container
Explanation: The CMD instruction specifies the default command to run when the container starts.
Explanation by: Praveen Singh
The CMD instruction specifies the default command to run when the container starts.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
227
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Praveen Singh
Publisher
πŸ“ˆ
89%
Success Rate