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

DevOps

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started 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.