Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proactively delete old Docker images and dangling containers #571

Open
pietroalbini opened this issue Apr 14, 2021 · 0 comments
Open

Proactively delete old Docker images and dangling containers #571

pietroalbini opened this issue Apr 14, 2021 · 0 comments

Comments

@pietroalbini
Copy link
Member

Over time the filesystem of a Crater agent fills up with previous Docker images and containers that failed to be cleaned up. Purging those on crater-azure-1 today freed up around 120GB of storage. We should have a cron somewhere (either on the agent code or on a proper cron in the server) that does the equivalent of:

docker ps -a | grep Exited | awk '{print($1)}' | xargs docker rm
docker image prune

For context, containers that failed to be cleaned up exist because of how Rustwide starts containers: docker create + docker start + docker rm. Rustwide is supposed to clean those containers up even if the Rust code panics or the build failed, but apparently sometimes docker rm itself fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant