Description:

Overview:

Format

Parser directives

Environment replacement

dockerignore

Shell and Exect form

Dockerfile FROM

Dockerfile RUN

Dockerfile CMD

Dockerfile ADD

COPY

  • Copy individual file from source code to image or COPY . .

WORKDIR

  • Equivalent to cd
  • The WORKDIR instruction sets the working directory for any RUNCMDENTRYPOINTCOPY and ADDinstructions that follow it in the Dockerfile.
  • If the WORKDIR doesn’t exist, it will be created even if it’s not used in any subsequent Dockerfile instruction.
    • WORKDIR /app

RUN

  • Run in shell

ENV

  • Environment variable