A container image is an immutable package used to create containers. Think of it as a bundle containing an application, the filesystem and dependencies it needs, and metadata such as the executable to run. A container is the running process created from that image, not the image itself. section 2.1.2
Run an existing image
After installing Docker, run `docker run busybox echo "Hello World"`. If the image is not already local, Docker pulls it from a registry, creates a container, and prints `Hello World`. You do not need to install BusyBox separately. section 2.1.3
An image registry stores images for sharing. You can build an image locally, push it to a registry, and pull it on another computer. Containers created from it get a filesystem derived from the image; additional filesystems can also be mounted into them. section 2.1.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
This minimal Dockerfile starts from `node:23-alpine`, copies in the application files, and sets the command to run when a container starts. section 2.2.2
Build an application image
From the directory containing the Dockerfile and application files, run `docker build -t kiada:latest .`. Docker builds the image and gives it the name `kiada` with the tag `latest`. Run `docker images` to see the resulting local image. section 2.2.2
Images consist of layers that multiple images can share, so a shared layer needs to be transmitted and stored only once. `docker history kiada:latest` shows the application’s build steps alongside those inherited from its base image. section 2.4 section 2.2.2
A Kubernetes Pod can name the image for its container in an `image` field, alongside settings such as the container port. The same application image built for local use can therefore be used when running the application with Kubernetes. section 5.2.1 section 2.2.2
Deleting a container does not delete its image: the stored image can be reused to create another container. To remove the image itself, use `docker rmi kiada:latest`; `docker image prune` removes unused images. section 2.2.5
























