Courses
Docker Advanced: Builds and Containers That Hold Up in Production
Final Check: Docker Advanced
Fifteen scenario questions across the whole course. If you get twelve or more right, you can build fast and lean images, run them safely under load and deploy them without surprises.
Course content
Join this Course
Sign in to save your progress.
-
Faster Builds
-
BuildKit: Cache Mounts and Why Rebuilds Are Slow
-
Multi-Stage Builds Without Shipping the Compiler
-
-
-
Images That Don't Leak
-
Non-Root Users and Dropping Capabilities
-
Pin Digests, Base Image Updates and CVEs
-
-
-
Running Under Load
-
Resource Limits, Restart Policies and Healthchecks
-
Logging Drivers and What Happens When Disk Fills
-
-
-
Beyond One Compose File
-
Compose Profiles, Watch and Override Files
-
Private Registries and Auth Without Sticking Tokens in Files
-
-
-
Production Concerns
-
Read-Only Root Filesystems and tmpfs
-
Rolling a Service Forward on One Host
-
When Docker Desktop Is the Wrong Tool
-
-
- Final Check: Docker Advanced
1.
A build log shows the base image and WORKDIR steps as CACHED, then COPY . . runs, then pip install runs again. You only changed a README file. What would have kept pip install cached?
2.
Which statement about a BuildKit cache mount is true?
3.
A Go service image is 950 MB. The Dockerfile is a single stage on golang:1.26-bookworm. What change shrinks it the most?
4.
docker run --rm --entrypoint id myimage prints uid=0(root). What should you do before this image goes to production?
5.
You run a container with read-only and with --cap-drop ALL. Which protection does each give?
read-only also drops all capabilities.
read-only stops writes to the image's files. Dropping capabilities stops root-only kernel actions such as changing file owners. Together with a non-root user they cover different risks.
Both do the same thing, so one is enough.
--cap-drop ALL makes the root filesystem read-only.
6.
Your Dockerfile pins alpine 3.24 by digest. Six months later a scan shows several fixed vulnerabilities in the base image. What is the right response?
7.
An image pushed to a private registry includes the line COPY config.json /root/.docker/config.json. What is the risk?
8.
Which docker login form is safe to use in a CI script?
9.
A container with memory 256m keeps dying under load with exit code 137, while the host has plenty of free memory. What should you do first?
10.
A health check uses curl, but the image is based on python alpine without curl. What will the container show?
11.
Two containers on one Docker Desktop machine both have memory limits of 8 GB, and the WSL 2 VM has 8 GB in total. What does that mean?
12.
You set the json-file driver with max-size 10m and max-file 5 for 40 containers. How much disk can their logs use in total?
13.
Your production Compose file uses host.docker.internal to reach a service on the host. It works on every laptop and fails on the Linux server. Why?
14.
In a blue and green deployment with an nginx proxy, why is nginx -s reload used instead of restarting the proxy container?
15.
You export an SBOM from today's build and scan it today and again in three months. The second scan finds more problems. What should you conclude?
About
Fifteen scenario questions across the whole course. If you get twelve or more right, you can build fast and lean images, run them safely under load and deploy them without surprises.
- Duration
- 15 min
- Last update
- 08/01/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.