Bird
0
0

Identify the error in this Docker run command:

medium📝 Debug Q6 of 15
Docker - Resource Management
Identify the error in this Docker run command:
docker run --cpu-reservation=2 --cpus=1 myimage
ACPU reservation must be an integer.
BThe syntax for --cpus is incorrect.
CCPU reservation cannot be higher than CPU limit.
DThe image name is missing.
Step-by-Step Solution
Solution:
  1. Step 1: Check CPU reservation vs limit logic

    CPU reservation sets minimum guaranteed CPU, and CPU limit caps max CPU usage. Reservation cannot exceed limit.
  2. Step 2: Analyze given values

    Here, reservation is 2 CPUs but limit is 1 CPU, which is invalid.
  3. Final Answer:

    CPU reservation cannot be higher than CPU limit. -> Option C
  4. Quick Check:

    Reservation ≤ limit rule violated [OK]
Quick Trick: Reservation must not exceed CPU limit [OK]
Common Mistakes:
  • Setting reservation higher than limit
  • Ignoring logical relationship between options
  • Assuming syntax error instead

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes