How can I set a memory limit for an entire docker-compose stack?
Asked Answered
H

1

8

Besides setting a limit for each service (container) inside the docker-compose I'd love to know if there is any way to simply limit the memory the docker-compose stack has access to, similarly to the solution of every container but generalized for all the stack.

Houchens answered 13/5, 2021 at 17:46 Comment(3)
like add as global?Argyrol
@EmersonPedroso yeah, like as global, (e.g. 4GB for all the three containers running in that stack)Houchens
unix.stackexchange.com/questions/537645/…Alephnull
C
4

As of today, there's no "global stack" memory limit (or CPU limit) option with Docker Compose (or Compose Specs).

Instead, you can:

Caucasoid answered 12/11, 2023 at 10:3 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.