Bird
0
0

What is the purpose of the --privileged flag when running a Docker container?

easy📝 Conceptual Q1 of 15
Docker - Security
What is the purpose of the --privileged flag when running a Docker container?
AIt runs the container in read-only mode.
BIt limits the container to only network-related capabilities.
CIt disables all capabilities for the container.
DIt grants the container all Linux capabilities and lifts security restrictions.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the --privileged flag

    The --privileged flag gives the container extended privileges, including all Linux capabilities and access to devices.
  2. Step 2: Compare with other options

    Other options limit capabilities or change container behavior, but only --privileged grants full privileges.
  3. Final Answer:

    It grants the container all Linux capabilities and lifts security restrictions. -> Option D
  4. Quick Check:

    Purpose of --privileged = Full privileges [OK]
Quick Trick: Use --privileged to give full container capabilities [OK]
Common Mistakes:
  • Confusing --privileged with --cap-add
  • Thinking it limits capabilities
  • Assuming it makes container read-only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes