Bird
0
0

After adding a HEALTHCHECK to your Dockerfile, the container still shows no health status. What could cause this?

medium📝 Troubleshoot Q6 of 15
Docker - Logging and Monitoring
After adding a HEALTHCHECK to your Dockerfile, the container still shows no health status. What could cause this?
AThe health check command is too fast and always succeeds
BThe base image does not support HEALTHCHECK instructions
CThe container is running in detached mode
DThe Docker daemon needs to be restarted
Step-by-Step Solution
Solution:
  1. Step 1: Check base image compatibility

    Some minimal base images do not support HEALTHCHECK instructions.
  2. Step 2: Verify health check functionality

    If the base image lacks support, Docker ignores HEALTHCHECK.
  3. Final Answer:

    The base image does not support HEALTHCHECK instructions -> Option B
  4. Quick Check:

    Unsupported base images cause no health status [OK]
Quick Trick: Verify base image supports HEALTHCHECK [OK]
Common Mistakes:
  • Assuming detached mode affects health checks
  • Restarting daemon unnecessarily
  • Confusing command speed with health check detection

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes