Intermediate Docker & Containers
Q50 / 100

How can you limit the amount of memory a container can use?

Correct! Well done.

Incorrect.

The correct answer is B) Using the "--memory" (or "-m") flag with "docker run", e.g. "docker run -m 512m", which is enforced via cgroups

B

Correct Answer

Using the "--memory" (or "-m") flag with "docker run", e.g. "docker run -m 512m", which is enforced via cgroups

Explanation

Docker uses cgroups to enforce resource limits like "--memory" and "--cpus", preventing a single container from consuming all of the host's resources.

Progress
50/100