Bird
0
0

What will be the output of the command below if the container's health check passes?

medium📝 Command Output Q5 of 15
Docker - Logging and Monitoring
What will be the output of the command below if the container's health check passes?
docker inspect --format='{{.State.Health.Status}}' mycontainer
Aunhealthy
Bhealthy
Cstarting
Dexited
Step-by-Step Solution
Solution:
  1. Step 1: Understand docker inspect health status output

    The command prints the health status of the container.
  2. Step 2: Identify status for passing health check

    If health check passes, status is 'healthy'.
  3. Final Answer:

    healthy -> Option B
  4. Quick Check:

    Passing health check status = healthy [OK]
Quick Trick: Inspect container health status with docker inspect [OK]
Common Mistakes:
  • Expecting 'starting' or 'exited' for passing health check
  • Misreading the format string in docker inspect

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes