Check: Docker
Eight questions on images, networking, volumes, Dockerfile, and compose. You can retake it.
Final check for the module. Eight questions covering every lesson in the track: why containers, your first container, images, Dockerfile, volumes and environment variables, networks and compose. After the questions comes a mini-project: a small service that you need to package into an image and run together with Redis via compose. The whole module is useful here.
How it's graded
The lesson is complete once all eight answers are correct. If you get one wrong, click "Retry": you get unlimited attempts. Progress only saves once the quiz is passed in full.
Under many questions there are commands you can use to check the answer yourself. All of them set the label
izi.lab=docker-08-quiz, limit memory, and remove what they created at the end. They don't touch anyone
else's containers. The output shown is from Docker Desktop on macOS. On Linux the kernel version and
addresses will differ, but the idea is the same.
Mini-project
The quiz checks what you remember. The mini-project checks what you can actually do. There's a Python
service that counts hits in Redis. You need to write a Dockerfile and a compose.yaml for it: your own image
without root, Redis with no ports exposed outside, data in a named volume, a healthcheck and limits. At the
end, the counter needs to survive docker compose down.
Works the same on Linux, macOS and WSL2, you need Docker with compose v2. Instructions:
labs/01-hit-counter/README.md. Takes about 40 minutes.
What you'll need for the tasks
FROMwith an exact tag,WORKDIR,COPY,CMD,USER(the Dockerfile lesson)docker compose up -d --build,ps,logs,down, and howdowndiffers fromdown -v(the compose lesson)build:andimage:on the same service,environment:,ports:with the127.0.0.1address,volumes:at the service and project level (the volumes and compose lessons)healthcheck:anddepends_onwithcondition: service_healthy(the compose lesson)deploy.resources.limits(the compose lesson, section on the boundary with Kubernetes)localhostinside a container, and reaching a neighbor by service name (the environment variables and networks lessons)
Quiz · review the topic
Check what you remember
01 How does a container differ from a virtual machine?
02 Which of these is NOT a Linux namespace that isolates a container?
03 Three containers were started from the same nginx:1.27.3-alpine image. How many times do the image's layers sit on disk?
04 Which COPY order in a Dockerfile makes the best use of the build cache?
05 Why use a multi-stage build?
06 After docker rm db, the postgres data is gone. What does Docker recommend for database data?
07 Two containers were started with docker run without any network flags. Why doesn't ping <name> work between them?
08 In compose, api tries to connect to the database and gets ECONNREFUSED 127.0.0.1:5432. What's wrong?
Go through it with an AI agent
The agent explains anything unclear in plain words, gives you 1 lab for this lesson and drills you on interview questions. $49 one-time, lifetime access.
Tell the agent: use MCP izi, give me lesson docker-basics-08-quiz-docker
Progress saved in this browser
Clear your history or open this on your phone, and the marks will be gone. Leave your email and they'll move to your account. No password needed.
Done. moved to your account. You can see your progress on any device. My progress