Guide 01 / 3
Docker glossary
Understand how images, containers, networks, volumes and services work.
Identify the Docker concepts and explain their role in your own words.
01 · Understanding containers
Docker lets you run an application with what it needs, reproducibly. The host machine and the containers share the system kernel: a container is therefore not a complete virtual machine.
Container
An isolated environment in which one or more processes linked to an application run. It uses the host's kernel, but has its own view of files, processes and networks.
Example
Une instance Nginx qui sert un site web.
A container can be stopped and replaced: do not keep your important data only in its writable layer.
Image
A read-only template of files and metadata used to create containers. It notably contains the application and its dependencies.
Example
L’image nginx:alpine permet de lancer plusieurs conteneurs Nginx.
Image = template; container = running of the template.
Docker Engine
The set of components that run and manage containers. It notably includes the Docker daemon and a programming interface.
Example
Le service Docker Engine fonctionne sur un serveur Linux.
Docker daemon (dockerd)
The server process that receives requests from the Docker client then manages images, containers, networks and volumes.
Example
docker ps interroge le démon pour obtenir les conteneurs.
Docker CLI
The command-line interface used from a terminal to communicate with Docker Engine.
Example
docker run, docker build et docker logs sont des commandes CLI.
Host
The physical or virtual computer on which Docker is installed and runs the containers.
Example
Un VPS Ubuntu peut être l’hôte de plusieurs services conteneurisés.
Virtualisation / virtual machine
A VM emulates or virtualises a complete system with its own kernel. A container shares the host's kernel and mainly isolates processes; the uses and levels of isolation differ.
Example
Une VM Linux peut elle-même héberger des conteneurs Docker.
Isolation
Logical separation of processes, file systems and networks, notably with Linux namespaces and cgroups.
Example
Un service dans un conteneur ne voit pas automatiquement les processus des autres.
Main process (PID 1)
The program started first in the container. It generally represents the service to run: web server, Python script or database engine. Its end normally causes the container to stop.
Example
node server.js peut devenir le PID 1 du conteneur.
A main process must handle stop signals correctly.
02 · Images and building
An image is built once and can be used to start several containers on different compatible machines.
Dockerfile
A text file that describes the steps for building an image: base image, copying files, installation and default command.
Example
FROM python:3.13-slim
Build
The operation of producing an image from a Dockerfile and a build context.
Example
docker build -t demo:1.0 .
Build context
The set of files made available to the builder for the build, generally a folder. The final dot in docker build . means “current folder”.
Example
COPY . /app prend les fichiers de ce contexte, sauf exclusions.
The context does not refer to the directory inside the container.
Layer
A reusable layer of content produced while building an image. Layers make sharing and caching easier.
Example
Une couche peut contenir des bibliothèques installées lors d’un RUN.
Build cache
The result of previous steps kept so as not to redo identical operations. Changes in the copied files can invalidate the following steps.
Example
Copier les dépendances avant le code évite de tout réinstaller à chaque modification.
Tag
A label that identifies a variant or version of an image in an image reference. It is not a guarantee of immutability.
Example
nginx:1.28
Digest
A cryptographic identifier of an image's content, useful for deploying a specific version.
Example
nginx@sha256:…
Registry
A service that stores and distributes container images.
Example
Docker Hub ou un registre privé GitLab.
Docker Hub
The public registry offered by Docker for discovering and distributing images.
Example
docker pull nginx:alpine
.dockerignore
A file defining which paths must not be sent into the build context. It reduces the context size and avoids including certain sensitive items.
Example
node_modules
.git
.env
03 · Running and exchanges
A container is more than a file: it launches a program, can expose ports and exchange data with other services.
RUN
A Dockerfile instruction executed during the build. It changes the content of the image produced and does not start the service at launch.
Example
RUN npm ci
CMD
A Dockerfile instruction that indicates the default command or arguments when the container starts. It can be replaced at docker run.
Example
CMD ["node", "server.js"]
ENTRYPOINT
A Dockerfile instruction that defines the executable to launch at startup. “Main executable” means the program that carries the container's work: nginx, python, node, etc.
Example
ENTRYPOINT ["python", "main.py"]
CMD can supply its default arguments.
Container port
The TCP or UDP number on which an application listens inside its network.
Example
Nginx écoute généralement sur le port TCP 80.
EXPOSE
An instruction that documents the port on which the application is meant to listen. On its own it does not open access from the host.
Example
EXPOSE 3000
To publish the port, use -p with docker run or ports in Compose.
Port publishing
An association between a port on the host machine and a port in the container.
Example
-p 8080:80 signifie hôte:8080 → conteneur:80.
Environment variable
A named value passed to the process at startup to adapt its behaviour without changing its code.
Example
NODE_ENV=production
Do not confuse a variable with a secrets vault.
Healthcheck
A test command run periodically to know whether a service responds according to a defined criterion.
Example
Un test HTTP sur /health peut signaler un service unhealthy.
Restart policy
A rule that tells Docker under what conditions to restart a stopped container.
Example
restart: unless-stopped
04 · Networks, data and Compose
Containers are replaceable; their network and their data require explicit choices.
Named volume
A storage space managed by Docker, separate from a container's lifecycle. It lets you keep a database's files after the container is recreated.
Example
postgres_data:/var/lib/postgresql/data
Bind mount
Mounting a host file or folder inside the container. Handy in development to see changes without rebuilding the image.
Example
./src:/app/src
Persistence
Keeping data beyond the stopping or replacement of a container.
Example
Une base PostgreSQL conserve les tables grâce à un volume.
Network
A Docker virtual network that lets the attached containers communicate.
Example
Le service web appelle la base via son nom db.
Bridge
A common type of Docker network on a single host. The containers on the network can communicate according to the rules in place.
Example
Compose crée généralement un réseau de projet.
Internal DNS
A name resolution service that lets containers on the same network find the others by their service name.
Example
http://api:3000 depuis un conteneur du même projet.
Docker Compose
A tool that describes and drives an application made up of several services using a YAML file.
Example
docker compose up -d
Compose service
The definition of a type of container in compose.yaml: image, ports, volumes and environment.
Example
web et db sont deux services distincts.
Compose project
A logical group of services, networks and volumes managed together and identified by a project name.
Example
name: boutique-demo
YAML
A text data format organised notably by indentation. A Compose file uses YAML to describe a configuration.
Example
services:
web:
image: nginx:alpine
Indentation is significant: use spaces, not tabs.
Secret
Sensitive information such as a password or a token. Compose supports secrets mounted as files.
Example
Éviter d’inscrire un vrai mot de passe dans le JSON pédagogique ou compose.yaml.