DevOps/Docker/Dockerfile
Appearance
Dockerfile is a text file where you define instructions used to create your Docker images, check official Dockerfile Reference documentation: https://docs.docker.com/engine/reference/builder/
For creating this file with instructions usually called Dockerfile you can use the following keywords[1]:
- ADD
- ARG
- CMD, for executing containers. https://docs.docker.com/engine/reference/builder/#cmd
- COPY
- ENTRYPOINT: https://docs.docker.com/engine/reference/builder/#entrypoint
- ENV
- EXPOSE
- FROM
- HEALTHCHECK
- LABEL
- ONBUILD
- RUN: https://docs.docker.com/engine/reference/builder/#run
- SHELL
- STOPSIGNAL
- USER
- VOLUME
- WORKDIR
Activities
[edit | edit source]- Learn differences between RUN and CMD or ENTRYPOINT: https://stackoverflow.com/a/25150809
- Read Understand how CMD and ENTRYPOINT interact https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact