BlackFriday 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
14 days 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
15 days 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
...
Marjory
16 days 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
17 days 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
18 days 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
...
Annamae
26 days 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
28 days 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
Garry
9 days ago
B) `docker run -cpu-period
upvoted 0 times
...
Edna
13 days ago
A) `docker run -privileged
upvoted 0 times
...
...
Aja
1 months ago
But running with the privileged flag gives the container more access, not lift cgroup limitations.
upvoted 0 times
...
Chaya
1 months ago
I disagree, I believe the correct answer is B) `docker run -cpu-period.
upvoted 0 times
...
Aja
1 months ago
I think the answer is A) `docker run -privileged.
upvoted 0 times
...
Marla
1 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
1 months ago
I'm putting my money on B, -cpu-period. Gotta manage those resources, you know? Plus, it sounds fancy.
upvoted 0 times
Erick
15 days ago
C) `docker run -isolation
upvoted 0 times
...
Wilburn
22 days ago
B) `docker run -cpu-period
upvoted 0 times
...
Merlyn
23 days ago
A) `docker run -privileged
upvoted 0 times
...
...
Malika
1 months ago
Definitely option A, -privileged. That's the only way to lift those pesky cgroup limitations, am I right?
upvoted 0 times
Karl
21 hours ago
Actually, it's option A, -privileged, that lifts cgroup limitations.
upvoted 0 times
...
Gerald
2 days ago
I think it's option B, -cpu-period, that lifts cgroup limitations.
upvoted 0 times
...
Venita
22 days ago
Yes, you are right! Option A, -privileged, is the flag that lifts cgroup limitations.
upvoted 0 times
...
...

Save Cancel