An attempt to mitigate resource exhaustion using cgroups features directly in compose.yaml for Docker containers
Tip
Don't let technical problems KILL your AMBITIONS...
- Know how to use the command line
- Know docker and docker compose basic commands
3 steps :
Step 1:
Clone this repo or use the example compose.yaml file and adapt it:
git clone https://github.com/alexandreelise/caps
Step 2:
Go to the directory you just cloned and run that command in your terminal
cd caps &&
APP_IMAGE=php:8.5-apache docker compose up -d
or
cd caps &&
APP_IMAGE=replace_with_your_favourite_docker_image_here docker compose up -d
Step 3:
Run shell docker compose stats command to VERIFY the RESOURCES are ACTUALLY RESTRICTED as EXPECTED
docker compose stats
That's it! You have successfully mitigated resource exhaustion of your system.