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

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!

  • FROM -It should be the first instruction in the Dockerfile. It is used to specify our base layer from which we are creating the image.
  • MAINTAINER – It is used to set the author.
  • RUN – It is used to run a command in shell.
  • CMD – It provides a default executable for a container.
  • LABEL – It is used for putting some metadata in a container.
  • EXPOSE – Expose a port and listens to it.
  • ENV – Used to set the environment variables.
  • ADD – Add new files and directories to filesystem.
  • COPY – Copies files and directories from src to dest.
  • ENTRYPOINT – Allows you to configure a container that will run as an executable.
  • VOLUME – Creates a mount point.