Type the commands without looking, then press Enter: the check compares character for character (extra spaces ignored), so a valid variant may be rejected, open the answer then. For the other questions, answer before revealing: the recall effort is what makes it stick.

Rappel actif

Restitue de mémoire, sans support.

  1. Contrast containers and VMs on four points: operating system, isolation, startup time and resource usage.

  2. Name the six Linux namespaces from the course and what each isolates.

  3. Trace docker run nginx through dockerd, containerd and runc, in order.

Tape la commande

Écris la commande exacte, puis Entrée pour vérifier.

  1. Build an image tagged myapp:1.0 from the Dockerfile in the current directory.

  2. List all containers, including stopped ones.

  3. Open an interactive shell inside the running container named web.

  4. Remove the stopped container named web, deleting its writable layer.

  5. Show the logs of the container named web.

Écris-le

Rédige la requête, la configuration ou le code, puis compare avec la réponse.

  1. Write a Dockerfile for a Python 3.12 app: work in /app, copy the project in, install from requirements.txt, expose port 8000, and start it with python app.py.

Distingue

Deux notions proches : dis ce qui les sépare vraiment.

  1. Namespaces and cgroups: which question does each answer, and why do you need both for a usable container?

  2. Image and container: what exactly is the difference, in terms of layers?

  3. dockerd, containerd and runc: what is each responsible for?

  4. Docker and Podman: name two architectural differences.

  5. LXC and Docker both use namespaces + cgroups. What do they target differently?

Explique pourquoi

Le mécanisme derrière la règle.

  1. Why do containers start in milliseconds while a VM takes seconds to minutes?

  2. Why is a container’s isolation “weaker” than a VM’s, and what is the security consequence?

  3. Why does the layered image model save disk space and speed up builds?

  4. Why is data in a container called “ephemeral,” and how do you keep data that must survive?

Cas pratique

Choisis et justifie avec les critères du cours.

  1. A team ships a microservice that “works on my machine” but breaks in testing because of dependency versions. How do containers fix this, and what single artifact guarantees the consistency?

  2. You run 3 replicas of a web container across a cluster; one node dies. What does an orchestrator do, and which four jobs does it handle in general?

Trouve l'erreur

Chaque affirmation contient au moins une faute.

  1. “Docker is the Linux kernel feature that isolates containers.”

  2. “Stopping a container deletes its data, so I stop containers to clean up.”

  3. “A Linux container image will run natively on a Windows host because containers are portable.”

Classe

Range chaque élément et explique les cas limites.

  1. Match each milestone to what it brought: chroot (1979), FreeBSD Jails (2000), cgroups (2005-07), LXC (2008), Docker (2013).

  2. For each need, pick an orchestrator: (a) learning on a small cluster; (b) production at any scale; (c) a team that does not want to run the control plane; (d) mixed workloads (containers, VMs, binaries).

Et si...

Prévois la conséquence.

  1. What if you set no cgroup memory limit on a container that has a memory leak?

  2. What if an image built with Docker needs to run on a Kubernetes node that uses containerd or CRI-O, not Docker?