in DevOps by
Q:

Q. What are the most common instructions in Dockerfile?

1 Answer

0 votes
by

Some of the common instructions in Dockerfile are as follows:

  • FROM: We use FROM to set the base image for subsequent instructions. In every valid Dockerfile, FROM is the first instruction.
  • LABEL: We use LABEL to organize our images as per project, module, licensing etc. We can also use LABEL to help in automation.
    In LABEL we specify a key value pair that can be later used for programmatically handling the Dockerfile.
  • RUN: We use RUN command to execute any instructions in a new layer on top of the current image. With each RUN command we add something on top of the image and use it in subsequent steps in Dockerfile.
  • CMD: We use CMD command to provide default values of an executing container. In a Dockerfile, if we include multiple CMD commands, then only the last instruction is used.
Click here to read more about DevOps
Click here to read more about Insurance

Related questions

+1 vote
asked Aug 15, 2020 in DevOps by RShastri
+1 vote
asked Aug 15, 2020 in DevOps by RShastri
0 votes
+1 vote
asked Aug 15, 2020 in DevOps by RShastri
+1 vote
asked Aug 15, 2020 in DevOps by RShastri
0 votes
asked Aug 15, 2020 in Continuous Deployment by RShastri
0 votes
asked Feb 5, 2020 in Big Data | Hadoop by SakshiSharma
0 votes
asked Nov 22, 2019 in Agile by rajeshsharma
...