Skip to content
masterclass Buddy

DevOps · Concept

Dockerfile

A Dockerfile is a text file with instructions for building a Docker image. It commonly selects a base image, installs dependencies, copies source files, and defines how a container starts.

Last updated

Syntax

FROM <image>
WORKDIR <directory>
COPY <src> <dest>
RUN <command>
ENV <name>=<value>
EXPOSE <port>
CMD ["<command>", "<arg1>"]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • FROM
  • WORKDIR
  • COPY
  • RUN
  • ENV
  • EXPOSE
  • USER
  • CMD

Source: Dockerfile overview. Checked 2026-11-03.