• +91 9723535972
  • info@interviewmaterial.com

Docker Interview Questions and Answers

Related Subjects

Question - List the most commonly used instructions in Dockerfile?

Answer -

  • FROM: This is used to set the base image for upcoming instructions. A docker file is considered to be valid if it starts with the FROM instruction.
  • LABEL: This is used for the image organization based on projects, modules, or licensing. It also helps in automation as we specify a key-value pair while defining a label that can be later accessed and handled programmatically.
  • RUN: This command is used to execute instructions following it on the top of the current image in a new layer. Note that with each RUN command execution, we add layers on top of the image and then use that in subsequent steps.
  • CMD: This command is used to provide default values of an executing container. In cases of multiple CMD commands the last instruction would be considered.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners