Created
September 8, 2020 09:49
-
-
Save jmbataller/ad72e719eedc8fc52091a6520b39b632 to your computer and use it in GitHub Desktop.
docker container resources limit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use `--compatibility` to convert the docker compose file to v2 api as the resource limitation are not in the v3 API of docker compose: | |
> docker-compose --compatibility up | |
``` | |
version: "3.4" | |
services: | |
redis: | |
image: "redis:alpine" | |
deploy: | |
resources: | |
limits: | |
cpus: "0.50" | |
memory: "50M" | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment