Courses
Docker Advanced: Builds and Containers That Hold Up in Production
Check Yourself: Running Under Load
Five scenario questions on exit code 137, CPU limits, health status, restart policies and log options. 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 keeps exiting with code 137 and docker inspect shows OOMKilled=true. What does that tell you?
2.
You set --cpus 0.5 on a busy worker. What happens when the worker wants more CPU?
3.
A container has restart unless-stopped and a health check. The app hangs and the container shows unhealthy for an hour. Docker Compose did not restart it. Why?
unless-stopped never restarts containers.
Plain Docker and Compose only mark a container unhealthy. The restart policy reacts to the process exiting, not to the health status.
The restart policy needs a few hours before it acts.
The health check must be in the Compose file, not the image, to trigger restarts.
4.
A one-off database migration job is defined with restart always in Compose. What will happen after it finishes successfully?
5.
You set log options max-size 10m and max-file 3 in daemon.json and restarted Docker. A container created last week still has logs growing past 30 MB. Why?
About
Five scenario questions on exit code 137, CPU limits, health status, restart policies and log options. 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.