This exam closes level 1 of the Docker course, "Introduction to containers". A virtual machine has no container engine, only skopeo, umoci, runc and jq. You must take an image from a registry all the way to a running container, on your own, with no step-by-step guide, using what the lessons of the level taught you. The exam teaches you nothing new; it checks that you can do it. Allow about 45 minutes.
What you will learn
- Say what the exam provides, what it expects and what it grades you on.
- Spot the level 1 lessons to review before you start.
- Read your result to decide whether to move on to level 2 or to consolidate.
Prerequisites
The lessons of the three modules of level 1 must be finished, up to Choosing a container engine: Docker, Podman, LXC, the last one before this exam. The exam assumes that you know how to read an OCI image with skopeo and jq, build a container with the kernel's tools, and run a bundle with runc.
You work as root on the exam machine oci.lab, a Debian 13 VM with no engine, in the /srv/epreuve directory. The lab installs the versions used in the level 1 lessons there: runc 1.1.15, umoci 0.4.7, skopeo 1.18.0 and jq 1.7.1. Use the lab environment you used for the previous lessons.
What does the exam ask of you?
The starting image is docker.io/library/busybox:1.37.0, for the linux/amd64 platform. At the end, /srv/epreuve must hold five things, which the lab statement describes one by one.
- An
image/directory that is an OCI layout holding thelinux/amd64variant, copied by its digest, under the taglivraison. Thedigest.txtfile records, on a single line of the formsha256:..., the digest that the layout holds under this tag: the one of thelinux/amd64manifest, not the one of the index. - A
blobs.sha256file in thesha256sumformat, covering every blob ofimage/, with paths relative toimage/. Run fromimage/,sha256sum -c ../blobs.sha256must succeed. - A
bundle/directory, an OCI bundle built from this image. - A
runccontainer namedescale, running in the background frombundle/, with the host namequai-nord. - A memory cap of 64 MiB for this container, readable in its cgroup.
Nobody tells you which commands to type or in what order. This page does not give them either: choosing the commands is part of the exam.
How is it graded?
The lab does not look at the commands you typed. It reads back the state of the machine at the moment you hand in your work: the files of /srv/epreuve, the container listed by runc and its cgroup. Two different paths that end in the same state get the same grade.
Five checks of equal weight share the 100 points, one for each item of the list above, and you must reach 75 points to pass. With no hint, that leaves room for a single missed check. Checks 4 and 5 read the running container: if it has stopped when the grading happens, both fail together. Since only the final state counts, check each item before you hand in, for example by running the blob verification again and reading the state of the container again.
Which rules apply?
This exam measures, it does not guide you. Three rules follow from that.
- The lab offers four hints, which you request with
dsoxlab hint. They cost 10, 15, 20 and then 25 points: with one missed check, a single hint is enough to fall under the threshold. - You may reread the lessons of the course and the built-in help of the tools (
skopeo copy --help,umoci unpack --help,runc --help), as you would at work. - The statement does not explain anything a second time, because the lessons have already taught what you need to know.
If you are stuck, first read what the tool answers. An error message from skopeo, umoci or runc almost always names the file or the field at fault. A command that returns no error does not prove either that the expected state has been reached: read the state again.
Which lessons should you review before starting?
This list does not point out the commands you need. It gathers the sections of level 1 that teach a step useful here. Start with those where your last labs were difficult. That is a better criterion than the order of the list.
- How do you copy an image by digest into a local layout?: copy with
skopeoand read the content of an OCI layout. - How do you follow the chain in the local layout?: find the index, the manifest and the blobs under
blobs/sha256. - How do you verify all the blobs at once?: produce and replay a
sha256sumreceipt. - How do you prepare a verified Alpine rootfs?: read what
sha256sum -cdoes when a digest does not match. - How do you go from an OCI image to a bundle without copying everything by hand?: build a bundle with
umoci. - What does config.json contain, field by field?: find where the host name and the resources are set.
- How do you run the container with runc run?: set a memory limit in
config.jsonbefore launching. - What is the lifecycle of a runc container?: create, start, list and inspect a named container.
- How do you cap the container's memory?: read
memory.maxin cgroups v2.
Take the exam
The lab prepares the machine, gives you the full statement, then grades the state in which you leave it. It chains the steps of the level, from the image to the limited container, and dsoxlab grades it on the five checks described above. Start it when you have about 45 minutes ahead of you, so that you can work in one go.
After the exam
If you pass the threshold, you can take a registry image to a running container without an engine, on the points measured. You can move on to level 2 and install Docker. A result under the threshold does not mean that you failed to learn. It shows where the gap is.
The messages of the checks describe what is missing, not the action to take. Link each missed check to a lesson in the list above, reread it, then redo the step yourself. Do not try to memorize an answer.
Key points
- The exam is a measurement: nothing is explained a second time, hints cost points and the grade covers the final state of the machine.
- It checks five items of equal weight: the layout copied by digest, the receipt of the blobs, the bundle, the named container with its host name, the memory cap.
- You need 75 points to pass: with no hint, at most one missed check.
- The grading ignores the commands you typed: it looks at the files, at the container listed by
runcand at its cgroup. - To close a gap, reread the matching lesson, then redo the step.