Docker file options

When you create a container, it is possible to customize you image based on another one so each container can be customized by our own docker file where we can:

•Define which image and version to use

•Run command lines

•Expose ports

•Copy files from the host

•Add environment variables

•Define volumes.

•To do so, there are different options available:

•FROM: IMAGE (DOWNLOAD THE IMAGE FRON THE REGISTRY)

•RUN: RUN ONE OR MANY COMMAND LINES

•COPY: COPY FILE INTO DOCKER

•ADD: SAME AS COPY BUT FOR COMPRESSED FILES

•WORKDIR: WORKING DIR (STARTING POINT FOLDER)

•ENTRYPOINT: CMD TO RUN AT START OF THE CONTAINER

•CMD: SAME AS ENTRYPOINT (BUT OVERIDABLE)

•ENV: ENV VARIABLE

•LABEL: METADATA

•HEALTHCHECK: CHECK IF THE APPLICATION IS RUNNING

•STOPSIGNAL: CHANGE STOP BEHAVIOUR

•VOLUME: LINK HOST PATH TO DOCKER INTERNAL PATH

•MOUNT: MOUNT A VOLUME

•EXPOSE: EXPOSE PORTS