Docker Container Marked `unhealthy` Because `curl` Is Missing in Minimal Image
Distroless or slim image lacks `curl`/`wget` invoked by `HEALTHCHECK`.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: Docker Container Marked `unhealthy` Because `curl` Is Missing in Minimal Image
Platform: Docker
Common Root Causes:
- Distroless or slim image lacks `curl`/`wget` invoked by `HEALTHCHECK`.
Interactive Diagnostic Checklist
Verified Solutions:
- Use Node/Python one-liner or compiled healthcheck binary instead of `curl`.
Safe Diagnostic Command:
docker inspect --format "{{json .State.Health}}" <id>Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Distroless or slim image lacks `curl`/`wget` invoked by `HEALTHCHECK`. Recommended diagnostic: `docker inspect --format "{{json .State.Health}}" <id>`. Remediation: Use Node/Python one-liner or compiled healthcheck binary instead of `curl`.
Worked Examples
- Run `docker inspect --format "{{json .State.Health}}" <id>` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-docker-healthcheck-unhealthy-curl · Independently verified: 2026-11-25