Bird
0
0

You run this command but get an error:

medium📝 Troubleshoot Q6 of 15
Docker - Security
You run this command but get an error:
docker run --cap-add INVALID_CAP myimage

What is the most likely cause?
ADocker does not support adding capabilities.
BYou must use --cap-drop to add capabilities.
CThe image name is invalid.
DINVALID_CAP is not a recognized Linux capability.
Step-by-Step Solution
Solution:
  1. Step 1: Check capability name validity

    Docker requires valid Linux capability names; INVALID_CAP is not valid.
  2. Step 2: Understand correct usage

    --cap-add is correct to add capabilities; error is due to invalid capability name.
  3. Final Answer:

    INVALID_CAP is not a recognized Linux capability. -> Option D
  4. Quick Check:

    Invalid capability names cause errors [OK]
Quick Trick: Use valid Linux capability names with --cap-add [OK]
Common Mistakes:
  • Using --cap-drop to add capabilities
  • Assuming image name causes capability errors
  • Thinking Docker can't add capabilities

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes