Bird
0
0

Which Docker option sets a hard memory limit that kills the container if exceeded?

easy📝 Conceptual Q2 of 15
Docker - Resource Management
Which Docker option sets a hard memory limit that kills the container if exceeded?
A--memory-reservation
B--memory-swap
C--memory
D--cpu-shares
Step-by-Step Solution
Solution:
  1. Step 1: Identify hard memory limit option

    The --memory option sets a hard limit on container memory usage.
  2. Step 2: Confirm other options roles

    --memory-reservation is soft limit, --memory-swap controls swap, --cpu-shares is CPU related.
  3. Final Answer:

    --memory -> Option C
  4. Quick Check:

    Hard memory limit = --memory [OK]
Quick Trick: Use --memory for hard memory limits [OK]
Common Mistakes:
  • Using --memory-reservation for hard limits
  • Confusing CPU options with memory limits
  • Mixing swap and memory limit options

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes