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

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
Docker Instructions
FROM  : For using the base image. Eg. FROM ubuntu
ARG   : Used to create re-usable variables. Eg. ARG user=sooraj ... ${user}
MAINTAINER : Used to set the creator name in Metadata Eg. MAINTAINER SoorajSoman <<email>>
RUN   : Used to run command Eg. RUN apt-get update
EXPOSE : Used to give port information Eg. EXPOSE 80
USER  : To specify the runtime user Eg. USER guest
COPY  : Used to copy files Eg. COPY test.txt /mydir
ADD  : Used to add/extract files to the filesystem Eg.ADD test.txt /mydir
CMD : Used to set PID 1 Eg. CMD echo "Hello world"
ENTRYPOINT : Used to set PID 1 Eg. ENTRYPOINT ["/bin/echo", "Hello"]
VOLUME : Create/mount a volume to the docker container from the docker host file system.Eg. VOLUME /myvol
ENV  : Used to set environment variables Eg. ENV MY_NAME="Sooraj Soman"
WORKDIR : Used to set the working directory Eg. WORKDIR
 /path/to/workdir