Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jmbataller/ad72e719eedc8fc52091a6520b39b632 to your computer and use it in GitHub Desktop.
Save jmbataller/ad72e719eedc8fc52091a6520b39b632 to your computer and use it in GitHub Desktop.
docker container resources limit
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