Docker Cheatsheet

Build Image

docker build -t <tag name> .

Docker file needs to be located in the same folder

Push Image

docker push <tag name>

Inheritance

FROM <BASE IMAGE>

Variables

ENV APP_HOME /myapp
RUN mkdir $APP_HOME

ARG APP_HOME=""
RUN mkdir $APP_HOME

Add Files Into Image

ADD filename.md /filename.md
COPY --chown=user:group local_filename.md /path/container_filename.md