Asher MS
Asher MS

Reputation: 13

Limit RAM usage of docker on linux

In windows we can specify the RAM limit for WSL thus limiting the RAM usage of docker as a whole.

Can i do something similar in linux?

Google search only shows way to limit the usage of induvudual containers.

Thanks in advance..

Upvotes: 1

Views: 9733

Answers (2)

Slava Kuravsky
Slava Kuravsky

Reputation: 2816

You can limit memory and CPU on docker daemon with help of systemd unit:

https://unix.stackexchange.com/questions/537645/how-to-limit-docker-total-resources

Upvotes: 1

Antonio Petricca
Antonio Petricca

Reputation: 11026

As explained by the Docker Official Guide you can set limits on memory and cpu (this one only for swarms).

Upvotes: 1

Related Questions