Summary of commands in docker file
FROM select the base image
RUN execute command
CMD execute command, but only once in file, if more than one use last one or use as default parameter to ENTRYPOINT
LABEL adds metadata to the image
EXPOSE specifies the container to wait for requests on the specified port. Use it with -p when using docker run.
ENV assigns environment variables to images and containers
ADD copy the file into the image
COPY copy file into image different from ADD, where the source file can't be local as a remote url
ENTRYPOINT Command to run after starting the container
VOLUME assigns a mount point to the image
USER defines the user to use to run the RUN CMD ENTRYPOINT command
WORKDIR defines a working directory for RUN CMD ENTRYPOINT COPY ADD
ARG defines a variable for the BUILD episode
ONBUILD Used for running commands, but waiting for triggers to resume in case of waiting for another build
STOPSIGNAL command to stop using a system call signal
SHELL switches to a given shell