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

  • (A) To trigger instructions when the image is used as a base for another image
  • (B) To define the base image
  • (C) To specify the working directory
  • (D) To copy files into the container
πŸ’¬ Discuss
βœ… Correct Answer: (A) To trigger instructions when the image is used as a base for another image
Explanation: The ONBUILD instruction triggers commands when the image is used as a base for another image.
Explanation by: Vikash Gupta
The ONBUILD instruction triggers commands when the image is used as a base for another image.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
137
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
82%
Success Rate