Skip to content
Français
Account: not signed in, sync available My learning
Select theme
Français

By updated

Improve this page

This exam closes the "Build and publish an image" module of the Docker course. A repository holds an application but no Dockerfile: you must write the recipe, build the image and publish it on your own, with no hints, using what the lessons of the module taught you. It teaches you nothing new, it checks what you have learned. Allow about 45 minutes on a virtual machine running Docker Engine 29.9.2.

What you will learn

  • Say what the exam provides, what it expects and what it grades you on.
  • Spot the lessons to review before you start.
  • Read your result to decide whether to move on to the next module or to consolidate.

Prerequisites

The lessons of the "Build and publish an image" module must be finished, up to the last one, Publish and pull an image in a controlled way. The exam assumes that you know how to write a Dockerfile, choose what the build receives, declare the user of an image, then publish an image and retrieve it by its digest.

Use the lab environment you used for the previous lessons. A registry is already running there: you have nothing to install.

What does the exam ask of you?

The statement describes a small application and what is expected of its delivery: the image must respond as is, must not run as an administrator, must stay reasonable in size and must reach the lab's registry. The repository holds more than the application. It also keeps traces of its author's work, and deciding what goes into the image is part of the exam.

This page does not describe the scenario, so that the exam stays a measurement. You will read it in the lab statement, and only there.

How is it graded?

The lab does not look at your Dockerfile. It reads back the state of the system at the moment you hand in your work: the image built, what it contains, what the registry serves of it and what you recorded. One of the checks even plays the part of whoever receives the delivery, by pulling the image by its digest. Two different Dockerfiles that produce the same image get the same grade.

Six checks of equal weight share the grade, and you must reach 75 points to pass. The grade is the number of checks passed divided by six, multiplied by a scale of 100 points minus the cost of the hints you asked for, then rounded to the integer.

A critical requirement comes on top of the threshold: the token must appear in no layer of the image. The check does not look at what a container sees when it starts. It reads the complete archive of the image, all its layers, and it searches for the value of the token, not the name of the file that carried it. If the critical requirement fails, the exam is refused whatever the total: a good score does not make up for a shipped secret, because an image goes to a registry where others read it.

The other requirements count toward the total without being blocking. The size, for example, is judged on what your image adds to its base, compared with what a reference image adds to its own, with a wide margin: the base you choose does not count, only what you put on top of it does.

With no hint, five checks passed out of six give 83 points and clear the threshold, provided the critical requirement is one of them. Each hint lowers the maximum you can reach:

Hints requestedScaleChecks to pass
None1005 out of 6 (83 points; 4 out of 6 give 67)
The first905 out of 6 (75 points, right at the threshold)
The first two756 out of 6 (5 out of 6 give 62)
Three or more55 at mostThreshold not reachable

Which rules apply?

This exam measures, it does not guide you. Three rules follow from that.

  • The lab offers four hints, from the vaguest to the most explicit, and each one costs you points, from 10 for the first to 25 for the last. With two hints, you must pass all six checks; beyond two, the threshold is no longer reachable. An exam passed without a hint is therefore passed in full.
  • You may consult the lessons of the course and the official Docker documentation, as you would at work.
  • The statement explains nothing again, because the lessons of the module have already taught what you need to know.

If you are stuck, reread the statement and check your work the way someone receiving it would. An image that works on your machine does not prove that it can be delivered.

Which lessons should you review before starting?

The statement does not say which actions it asks for, and this list does not try to point them out either. It gathers, in the order of the course, the lessons of the module that teach an action useful here. Start by rereading those where your last labs were difficult.

Take the exam

The lab prepares the machine, gives you the statement, then grades the state in which you leave it. 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 with the critical requirement met, you can build and ship an image on your own, on the points measured. You can move on to the next module. 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 from the delivery, not the action to take. It is up to you to link each failed check to a lesson in the list above, to reread it, then to redo the action yourself. Do not try to memorize an answer.

Key points

  • The exam is a measurement. Nothing is explained again, hints cost points and the grade covers the final state of the system, not your Dockerfile.
  • You need 75 points to pass. With no hint or one, five checks out of six are enough; with two, all six must pass; with three or more, the threshold is no longer reachable.
  • A token present in a layer of the image fails the exam whatever the total, even if it was deleted afterwards.
  • Shipping means putting the image in a registry and being able to say which exact identity it serves.
  • To close a gap, reread the matching lesson, then redo the action.

Is this project useful to you?

The guides, courses, quizzes and labs stay free. If you use them regularly, you can contribute to their upkeep and development.

Become a supporting member (new tab) One-time support (new tab) Learn more

Follow the project on LinkedIn