Commit c356d4f9 authored by ale's avatar ale

Fix the docker-cleanup script for Podman

parent 153c0b49
Pipeline #6207 passed with stage
in 7 minutes and 2 seconds
......@@ -20,5 +20,3 @@
with_items:
- /etc/apt/sources.list.d/download_docker_com_linux_debian.list
- /etc/docker
- /usr/local/bin/docker-cleanup
- /etc/cron.d/docker-cleanup
......@@ -3,18 +3,6 @@
# Cleanup unused and unreferenced Docker images and containers.
#
# Cleanup exited containers.
docker ps -qa --no-trunc --filter "status=exited" \
| xargs --no-run-if-empty docker rm
# Cleanup dangling and untagged images.
docker images --filter "dangling=true" -q --no-trunc \
| xargs --no-run-if-empty docker rmi
docker images \
| awk '$2 == "<none>" {print $3}' \
| xargs --no-run-if-empty docker rmi
# Prune everything else (makes the above unnecessary?)
docker system prune --all --volumes
{{ container_runtime }} system prune --all --volumes --force
exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment