Bird
0
0

What is the output of this command if the Docker daemon is configured with 'json-file' logging driver by default?

medium📝 Command Output Q5 of 15
Docker - Logging and Monitoring
What is the output of this command if the Docker daemon is configured with 'json-file' logging driver by default?
docker inspect --format='{{.HostConfig.LogConfig.Type}}' mycontainer
Anone
Bfluentd
Cjson-file
Dsyslog
Step-by-Step Solution
Solution:
  1. Step 1: Understand inspect command output

    The command queries the log driver type used by the container 'mycontainer'.
  2. Step 2: Match with daemon default

    If Docker daemon default is 'json-file', the container inherits this unless overridden.
  3. Final Answer:

    json-file -> Option C
  4. Quick Check:

    Inspect log driver shows daemon default if not overridden [OK]
Quick Trick: Inspect shows container log driver, default if not changed [OK]
Common Mistakes:
  • Assuming inspect shows Fluentd without config
  • Confusing log driver with logging options
  • Expecting 'none' when logs are enabled

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes