Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Docker Exam DCA 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:

Jackie
1 months 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
2 months 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
Brittni
5 hours ago
B) `docker run -cpu-period
upvoted 0 times
...
Doretha
27 days ago
A) `docker run -privileged
upvoted 0 times
...
...
Marjory
2 months 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
2 months 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
2 months 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
10 days ago
I agree with you, it is A) `docker run -privileged` that lifts the cgroup limitations.
upvoted 0 times
...
Ruth
11 days ago
Actually, the answer is A) `docker run -privileged`. That flag lifts cgroup limitations.
upvoted 0 times
...
Monte
15 days ago
I think you are mistaken. The correct flag is B) `docker run -cpu-period`.
upvoted 0 times
...
Ashleigh
21 days ago
Yes, you are correct! It is A) `docker run -privileged`.
upvoted 0 times
...
...
Annamae
2 months 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
2 months 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
18 days ago
For sure, better safe than sorry.
upvoted 0 times
...
Edgar
19 days ago
Absolutely, can't be too careful with those capabilities.
upvoted 0 times
...
Cruz
20 days ago
Definitely! Security first, right?
upvoted 0 times
...
Skye
21 days ago
D) `docker run -cap-drop
upvoted 0 times
...
Yasuko
24 days ago
C) `docker run -isolation
upvoted 0 times
...
Garry
1 months ago
B) `docker run -cpu-period
upvoted 0 times
...
Edna
1 months ago
A) `docker run -privileged
upvoted 0 times
...
...
Aja
2 months ago
But running with the privileged flag gives the container more access, not lift cgroup limitations.
upvoted 0 times
...
Chaya
2 months ago
I disagree, I believe the correct answer is B) `docker run -cpu-period.
upvoted 0 times
...
Aja
2 months ago
I think the answer is A) `docker run -privileged.
upvoted 0 times
...
Marla
2 months 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
2 months ago
I'm putting my money on B, -cpu-period. Gotta manage those resources, you know? Plus, it sounds fancy.
upvoted 0 times
Antonette
24 days ago
I agree with you, B) `docker run -cpu-period does sound fancy and like it could help manage resources.
upvoted 0 times
...
Erick
25 days 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
26 days ago
I think it's A) `docker run -privileged. It sounds like it would lift limitations.
upvoted 0 times
...
Tawna
29 days ago
D) `docker run -cap-drop
upvoted 0 times
...
Erick
2 months ago
C) `docker run -isolation
upvoted 0 times
...
Wilburn
2 months ago
B) `docker run -cpu-period
upvoted 0 times
...
Merlyn
2 months ago
A) `docker run -privileged
upvoted 0 times
...
...
Malika
2 months ago
Definitely option A, -privileged. That's the only way to lift those pesky cgroup limitations, am I right?
upvoted 0 times
Ilene
1 months ago
I agree, option A, -privileged, is the flag to lift cgroup limitations.
upvoted 0 times
...
Karl
1 months ago
Actually, it's option A, -privileged, that lifts cgroup limitations.
upvoted 0 times
...
Gerald
1 months ago
I think it's option B, -cpu-period, that lifts cgroup limitations.
upvoted 0 times
...
Venita
2 months ago
Yes, you are right! Option A, -privileged, is the flag that lifts cgroup limitations.
upvoted 0 times
...
...

Save Cancel