List out all INSTRUCTION statement of dockerfile and give one line explanation. – Draft

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now


Dockerfile commands

DOCKER file CommandsDetails
1 FROM Taking the base image
2 MAINTAINER Creater of the dockerfile
3 RUN Run command in the container of the previous layer
4ARGSet a variable for the dockerfile and reuse it ${var}. Scope is only during the building process.
5EXPOSE Specifying information port for the container
6COPYCopy the files to the image
7ADD/EXTRACTExtract + Copy compressed files to the image
8USERSet a container the runtime user.
9CMDTo set PID 1
10ENTRYPOINT To set PID 1
11ENVFor setting the environment variable in the container.
12VOLUMECreate or mount a volume to the docker contanier from the docker host file system.
13WORKDIRSets the working directory or context inside the image we are building.
14ONBUILD For specifying the command to run when the image in the docker file is used as the base image for another docker image.