List out all INSTRUCTION statement of dockerfile and give one line explanation.
Specifies the base image. Specified docker image will be downloaded from registry if locally not available.
Eg: FROM ubuntu
Specifies the meta data about the user who creates.
Specifies meta data about the image. It will be in key value pair format
Eg: LABEL “Application_Environment”=”Development”
LABEL “Application_Support”=”LearnITGuide.net Group”
Expose instruction is used to inform about the network port the container listens on runtime.
Eg: EXPOSE 80 443
EXPOSE 80/tcp 8080/udp
The instruction helps to copy files, directories and remote URL files to destination. If the source is in compressed format, then it will be extracted to the destination folder.
Eg: ADD /root/testfile /data/
Copy is similar to ADD. Difference is it wont extract the source compressed file. It will just copy the source.
Eg: COPY /root/testfile /data/
Run command will execute any commands on the top of the current image and will create a new layer.
Eg: RUN yum update
RUN systemctl start httpd
ENTRYPOINT & CMD
Both are used to set PID
To set the environment variables. But this will be set only during image not on container.