Created
June 6, 2019 14:17
-
-
Save majindageta/aad6f5e3fc8799f9494192d34ad91ea7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM | |
The base image for building a new image. This command must be on top of the dockerfile. | |
MAINTAINER | |
Optional, it contains the name of the maintainer of the image. | |
RUN | |
Used to execute a command during the build process of the docker image. | |
ADD | |
Copy a file from the host machine to the new docker image. There is an option to use an URL for the file, docker will then download that file to the destination directory. | |
ENV | |
Define an environment variable. | |
CMD | |
Used for executing commands when we build a new container from the docker image. | |
ENTRYPOINT | |
Define the default command that will be executed when the container is running. | |
WORKDIR | |
This is directive for CMD command to be executed. | |
USER | |
Set the user or UID for the container created with the image. | |
VOLUME | |
Enable access/linked directory between the container and the host machine. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment