Last active
July 13, 2018 08:20
-
-
Save carousel/389d268598608eaa9c38edf54fac6153 to your computer and use it in GitHub Desktop.
Dockerfile reference with explanation
This file contains hidden or 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
#.dockerignore | |
#Sets the Base Image for subsequent instructions. | |
FROM | |
#(deprecated - use LABEL instead) Set the Author field of the generated images. | |
MAINTAINER | |
#execute any commands in a new layer on top of the current image and commit the results. | |
RUN | |
#provide defaults for an executing container. | |
CMD | |
#informs Docker that the container listens on the specified network ports at runtime. NOTE: does not actually make ports accessible. | |
EXPOSE | |
#sets environment variable. | |
ENV | |
#copies new files, directories or remote file to container. Invalidates caches. Avoid ADD and use COPY instead. | |
ADD | |
#copies new files or directories to container. Note that this only copies as root, so you have to chown manually regardless of your USER / WORKDIR setting. See https://github.com/moby/moby/issues/30110 | |
COPY | |
#configures a container that will run as an executable. | |
ENTRYPOINT | |
#creates a mount point for externally mounted volumes or other containers. | |
VOLUME | |
#sets the user name for following RUN / CMD / ENTRYPOINT commands. | |
USER | |
#sets the working directory. | |
WORKDIR | |
#defines a build-time variable. | |
ARG | |
#adds a trigger instruction when the image is used as the base for another build. | |
ONBUILD | |
#sets the system call signal that will be sent to the container to exit. | |
STOPSIGNAL | |
#apply key/value metadata to your images, containers, or daemons. | |
LABEL | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment