LOGBOOK

HELP

Quiz Entry - updated: 2026.12.01

Into which three sections are Dockerfile instructions grouped, and which instructions belong to each?

Fundamental (FROM, ARG), configuration (RUN, ADD/COPY, ENV) and execution (CMD, ENTRYPOINT, EXPOSE).

A Dockerfile is the blueprint of an image: a text file whose instructions Docker executes from top to bottom to build it.

Section Instructions Purpose
Fundamental FROM, ARG The base: which image to start from (own or external registry), and build-time variables.
Configuration RUN, ADD / COPY, ENV (also WORKDIR, LABEL) Shape the image: install dependencies, copy in files and folder structures, set environment variables.
Execution CMD, ENTRYPOINT, EXPOSE Describe what happens when a container starts: the default command, the fixed executable, and which port the app uses.

A minimal example from the lab:

ARG CODE_VERSION=latest
FROM alpine:${CODE_VERSION}
RUN apk update

docker image build -t alpineimage . builds it. The final . is the build context, the folder containing the Dockerfile and the files it may copy. Forgetting it is a classic mistake. (Alpine uses apk add where Debian and Ubuntu use apt-get install.)

Dockerfile structure: fundamental FROM and ARG, configuration RUN, ADD or COPY and ENV, execution CMD, ENTRYPOINT and EXPOSE

* Fundamental, configuration and execution instructions. *

Go deeper:

From Quiz: ISLAB / Docker Introduction | Updated: Dec 01, 2026