A Dockerfile instruction is a declarative command that specifies one step in building a container image. Docker reads the Dockerfile from the build context and processes its instructions through the Docker daemon. section 2.2.2
Listing 2.1 A minimal Dockerfile for building a container image
FROM node:23-alpine #1 COPY app.js /app.js #2 COPY html/ /html #3 ENTRYPOINT ["node", "app.js"] #4
A minimal Dockerfile combines FROM to select a base image, COPY to add application files, and ENTRYPOINT to define the container process. section 2.2.2
During a build, Docker pulls the base image when needed, creates a temporary container, executes the next instruction, and records the resulting state as an image layer. Processing continues until the final image is tagged. section 2.2.2
Building an image
Run docker build -t kiada:latest . from the directory containing the Dockerfile and application files. The dot supplies the build context; afterward, docker images lists the tagged image and docker history shows instruction-derived layers. section 2.2.2


