This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
|
utils_docker_setup [2020/05/08 17:48] xavier [Docker Compose] |
utils_docker_setup [2020/05/08 19:15] (current) xavier [Limit docker resources usage] |
||
|---|---|---|---|
| Line 68: | Line 68: | ||
| ==== Limit docker resources usage ==== | ==== Limit docker resources usage ==== | ||
| + | It is possible to set resources limits using docker-compose, without starting a swarm service.\\ | ||
| + | This feature was previously available in version 2 of compose-file. Since version 3, a new "deploy" section has been set up, normally only for 'docker stack deploy' feature, but then a --compatibility mode was added to docker-compose, so that it does not ignore information in the "deploy" section.\\ | ||
| + | To run a docker-compose.yml file above version 3 with resource limits, just run it like:\\ | ||
| + | ''$ sudo docker-compose --compatibility -f docker-compose.yml up -d''\\ | ||