Run a resource-bounded Docker service
8 steps · about 2 h 52 min · Intermediate
- Choose CPU and memory boundaries (guide, Docker Docs, 26 min)
Understand hard and soft controls before applying limits that could destabilise the service.
- Apply explicit resource settings (reference, Docker Docs, 28 min)
Express CPU and memory controls deliberately and observe how a running container accepts changes.
- Inspect configured health state (reference, Docker Docs, 20 min)
Filter and inspect health state so service readiness is checked rather than inferred from mere process existence.
- Select a controlled restart policy (guide, Docker Docs, 16 min)
Match restart behaviour to failure recovery without creating an unexplained crash loop.
- Bound and select container logging (guide, Docker Docs, 22 min)
Choose a logging driver and rotation strategy before logs consume the host disk.
- Observe live resource consumption (reference, Docker Docs, 18 min)
Compare actual CPU, memory and I/O use with the limits instead of guessing from response time.
- Inspect health and termination evidence (reference, Docker Docs, 20 min)
Read the configured state, health history, exit code and OOM evidence for a failed container.
- Rehearse and explain a failure (reference, Docker Docs, 22 min)
Generate a controlled fault, follow daemon events and document whether limits and restart behaviour worked as intended.