Last active
November 24, 2023 13:02
-
-
Save vncsna/f1ec1c1faa50c711ceb366c7b6f5a69f to your computer and use it in GitHub Desktop.
ecs-docker-cleanup.sh
This file contains hidden or 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
date; | |
docker ps -q --filter "status=exited" | xargs --no-run-if-empty docker rm; | |
docker volume ls -qf dangling=true | xargs -r docker volume rm; | |
# CRON | |
# */5 * * * * /home/ec2-user/ecs-docker-cleanup.sh >> /home/ec2-user/docker-cleanup.log | |
# Reference | |
# https://medium.com/@_ifnull/aws-ecs-no-space-left-on-device-ce00461bb3cb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment