List of docker file instructions and its Brief Summary?

  •  FROM command allows you to create a base image such as an operating system, a programming language, etc. 
  • RUN instruction is used to run specified commands. You can use several RUN instructions to run different commands.
  • CMD: If you want to run a docker container by specifying a default command that gets executed for all the containers of that image by default, you can use a CMD command.
  • ENTRY POINT: It starts the process we want to run after starting the container.
  • WORKDIR: You can specify your working directory inside the container using the WORKDIR instruction.
  • COPY: This instruction allows you to copy a directory from your local machine to the docker container.
  • ADD: Similar to COPY instruction, you can use ADD to copy files and folders from your local machine to docker containers. However, ADD also allows you to copy files from a URL as well as a tar file.
  • EXPOSE: The EXPOSE instruction inside the dockerfile informs that the container is listening to the specified port in the network. The default protocol is TCP.
  • LABEL: You can use a LABEL instruction to add description or metadata for a docker image. It’s a key−value pair.
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x