New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Docker DCA Exam - Topic 5 Question 97 Discussion

Actual exam question for Docker's DCA exam
Question #: 97
Topic #: 5
[All DCA Questions]

Which docker run` flag lifts cgroup limitations?

Show Suggested Answer Hide Answer
Suggested Answer: A

The --privileged flag lifts all the cgroup limitations for a container, as well as other security restrictions imposed by the Docker daemon1. This gives the container full access to the host's devices, resources, and capabilities, as if it was running directly on the host2. This can be useful for certain use cases that require elevated privileges, such as running Docker-in-Docker or debugging system issues3. However, using the --privileged flag also poses a security risk, as it exposes the host to potential attacks or damages from the container4. Therefore, it is not recommended to use the --privileged flag unless absolutely necessary, and only with trusted images and containers.

The other options are not correct because they do not lift all the cgroup limitations for a container, but only affect specific aspects of the container's resource allocation or isolation:

* The --cpu-period flag sets the CPU CFS (Completely Fair Scheduler) period for a container, which is the length of a CPU cycle in microseconds. This flag can be used in conjunction with the --cpu-quota flag to limit the CPU time allocated to a container. However, this flag does not affect other cgroup limitations, such as memory, disk, or network.

* The --isolation flag sets the isolation technology for a container, which is the mechanism that separates the container from the host or other containers. This flag is only available on Windows containers, and can be used to choose between process, hyperv, or process-isolated modes. However, this flag does not affect the cgroup limitations for a container, but only the level of isolation from the host or other containers.

* The --cap-drop flag drops one or more Linux capabilities for a container, which are the privileges that a process can use to perform certain actions on the system. This flag can be used to reduce the attack surface of a container by removing unnecessary or dangerous capabilities. However, this flag does not affect the cgroup limitations for a container, but only the capabilities granted to the container by the Docker daemon.


* Runtime privilege and Linux capabilities

* Docker Security: Using Containers Safely in Production

* Docker run reference

* Docker Security: Are Your Containers Tightly Secured to the Ship? SlideShare

* [Secure Engine]

* [Configure a Pod to Use a Limited Amount of CPU]

* [Limit a container's resources]

* [Managing Container Resources]

* [Isolation modes]

* [Windows Container Isolation Modes]

* [Windows Container Version Compatibility]

* [Docker and Linux Containers]

* [Docker Security Cheat Sheet]

* [Docker Security: Using Containers Safely in Production]

Contribute your Thoughts:

0/2000 characters
Karima
3 months ago
Wait, does `-isolation` even relate to cgroups?
upvoted 0 times
...
Rosalyn
3 months ago
Surprised that people still mix this up!
upvoted 0 times
...
Leonora
3 months ago
Yeah, `-privileged` is the correct flag.
upvoted 0 times
...
Taryn
4 months ago
I thought `-cap-drop` was the way to go?
upvoted 0 times
...
Merissa
4 months ago
It's definitely `-privileged` that lifts cgroup limits.
upvoted 0 times
...
Albina
4 months ago
I feel like I’ve seen `-cpu-period` in a similar context, but it’s more about CPU quotas, right?
upvoted 0 times
...
Mila
4 months ago
I’m a bit confused; I thought `-cap-drop` was related to capabilities, not cgroup limits.
upvoted 0 times
...
Dyan
4 months ago
I remember practicing a question about Docker flags, and `-privileged` seemed to be the one that grants more access.
upvoted 0 times
...
Dick
5 months ago
I think the `-privileged` flag is the one that lifts cgroup limitations, but I'm not entirely sure.
upvoted 0 times
...
Alita
5 months ago
I'm a little confused by this question. I know there are a lot of different Docker run flags, and it's hard to keep track of all of them. I'm going to have to review my notes on cgroups and container security before I can confidently answer this.
upvoted 0 times
...
Rutha
5 months ago
Ah, the old cgroup limitation question. I remember this one from the practice exams. I think the answer is A, `--privileged`. That flag gives the container essentially root-level access, which would bypass any cgroup restrictions.
upvoted 0 times
...
Edison
5 months ago
Hmm, I'm a bit unsure about this one. I know the `--cpu-period` flag is used to set the CPU CFS scheduler period, but I'm not sure if that would lift cgroup limitations. I'll have to think about this one a bit more.
upvoted 0 times
...
Effie
5 months ago
I'm pretty sure the answer is A. The `--privileged` flag is used to give the container full access to the host's devices, which would effectively lift any cgroup limitations.
upvoted 0 times
...
Jackie
1 year ago
I'm with Tashia on this one. `docker run -privileged` sounds like the way to go. Although, I do wonder if there's a hidden 'lift all the things' option that just nukes the whole cgroup system. Wouldn't that be fun?
upvoted 0 times
...
Clarinda
1 year ago
Well, I know for sure that `-cap-drop` is used to drop capabilities, not lift limitations. Gotta love these tricky Docker questions, am I right?
upvoted 0 times
Chantell
1 year ago
C) `docker run -isolation
upvoted 0 times
...
Ranee
1 year ago
Exactly, `-cap-drop` is used to drop capabilities, not lift limitations.
upvoted 0 times
...
Magda
1 year ago
A) `docker run -privileged
upvoted 0 times
...
Alex
1 year ago
Yeah, Docker questions can be tricky sometimes.
upvoted 0 times
...
Brice
1 year ago
D) `docker run -cap-drop
upvoted 0 times
...
Jesus
1 year ago
C) `docker run -isolation
upvoted 0 times
...
Brittni
1 year ago
B) `docker run -cpu-period
upvoted 0 times
...
Doretha
1 year ago
A) `docker run -privileged
upvoted 0 times
...
...
Marjory
1 year ago
Hmm, I haven't seen the `-isolation` flag before. That's an interesting one, but I don't think it's the right answer here.
upvoted 0 times
...
Aliza
1 year ago
I was thinking B) `docker run -cpu-period` might be the answer, but now I'm doubting myself. This stuff can get a bit tricky sometimes.
upvoted 0 times
...
Tashia
1 year ago
I'm pretty sure the answer is A) `docker run -privileged`. That's the flag that lifts the cgroup limitations, right?
upvoted 0 times
Leslee
1 year ago
I agree with you, it is A) `docker run -privileged` that lifts the cgroup limitations.
upvoted 0 times
...
Ruth
1 year ago
Actually, the answer is A) `docker run -privileged`. That flag lifts cgroup limitations.
upvoted 0 times
...
Monte
1 year ago
I think you are mistaken. The correct flag is B) `docker run -cpu-period`.
upvoted 0 times
...
Ashleigh
1 year ago
Yes, you are correct! It is A) `docker run -privileged`.
upvoted 0 times
...
...
Annamae
1 year ago
Wait, wait, wait... is the answer actually 'docker run -beer'? Just kidding, but you gotta admit, that would be a pretty sweet flag!
upvoted 0 times
...
Caitlin
1 year ago
D, -cap-drop, all the way! Gotta keep those capabilities in check, am I right? Plus, it's a great way to keep your container secure... or at least that's what they tell me.
upvoted 0 times
Frederica
1 year ago
For sure, better safe than sorry.
upvoted 0 times
...
Edgar
1 year ago
Absolutely, can't be too careful with those capabilities.
upvoted 0 times
...
Cruz
1 year ago
Definitely! Security first, right?
upvoted 0 times
...
Skye
1 year ago
D) `docker run -cap-drop
upvoted 0 times
...
Yasuko
1 year ago
C) `docker run -isolation
upvoted 0 times
...
Garry
1 year ago
B) `docker run -cpu-period
upvoted 0 times
...
Edna
1 year ago
A) `docker run -privileged
upvoted 0 times
...
...
Aja
1 year ago
But running with the privileged flag gives the container more access, not lift cgroup limitations.
upvoted 0 times
...
Chaya
1 year ago
I disagree, I believe the correct answer is B) `docker run -cpu-period.
upvoted 0 times
...
Aja
1 year ago
I think the answer is A) `docker run -privileged.
upvoted 0 times
...
Marla
1 year ago
Hmm, I'm feeling C, -isolation. I mean, who doesn't love a good old-fashioned container isolation, right? It's like a virtual playground for our apps!
upvoted 0 times
...
Gretchen
1 year ago
I'm putting my money on B, -cpu-period. Gotta manage those resources, you know? Plus, it sounds fancy.
upvoted 0 times
Antonette
1 year ago
I agree with you, B) `docker run -cpu-period does sound fancy and like it could help manage resources.
upvoted 0 times
...
Erick
1 year ago
I'm not sure, but I think it might be D) `docker run -cap-drop. It sounds like it could be related to managing resources.
upvoted 0 times
...
Jerrod
1 year ago
I think it's A) `docker run -privileged. It sounds like it would lift limitations.
upvoted 0 times
...
Tawna
1 year ago
D) `docker run -cap-drop
upvoted 0 times
...
Erick
1 year ago
C) `docker run -isolation
upvoted 0 times
...
Wilburn
1 year ago
B) `docker run -cpu-period
upvoted 0 times
...
Merlyn
1 year ago
A) `docker run -privileged
upvoted 0 times
...
...
Malika
1 year ago
Definitely option A, -privileged. That's the only way to lift those pesky cgroup limitations, am I right?
upvoted 0 times
Ilene
1 year ago
I agree, option A, -privileged, is the flag to lift cgroup limitations.
upvoted 0 times
...
Karl
1 year ago
Actually, it's option A, -privileged, that lifts cgroup limitations.
upvoted 0 times
...
Gerald
1 year ago
I think it's option B, -cpu-period, that lifts cgroup limitations.
upvoted 0 times
...
Venita
1 year ago
Yes, you are right! Option A, -privileged, is the flag that lifts cgroup limitations.
upvoted 0 times
...
...

Save Cancel