Courses
Docker Advanced: Builds and Containers That Hold Up in Production
Check Yourself: Images That Don't Leak
Five scenario questions on capabilities, USER lines, port 80, digests and scan results. If you miss more than one, reread the lessons in this section.
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 container runs as root with Docker's default capabilities. You add --cap-drop ALL and the app keeps working. What changed?
2.
You add USER app as the second line of your Dockerfile, before RUN apk add. The build fails with a permission error. What is the right fix?
3.
A team says their app must run as root because it listens on port 80. On a current Docker version, what is true?
The app needs --privileged to listen on port 80.
Non-root containers cannot publish any ports.
Only root can ever listen on ports below 1024.
A non-root user can bind port 80 inside the container, because Docker lowers the unprivileged port start for the container. If a platform does not allow it, publish a high port such as 8080 instead.
4.
Your Dockerfile has FROM python:3.14-alpine@sha256 followed by a digest. A security fix for the base image is published next week. What happens to your next build?
5.
A vulnerability scan of the same image gave 3 findings last month and 9 today. Nobody rebuilt the image. What is the most likely explanation?
About
Five scenario questions on capabilities, USER lines, port 80, digests and scan results. If you miss more than one, reread the lessons in this section.
- Duration
- 5 min
- Last update
- 08/01/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.