Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 13 lines (9 sloc) 286 Bytes
#!/bin/bash
set -e
# default: 14 days
hours_limit="${1:-336}"
docker container prune --force
docker network prune --force
docker volume prune --force
echo "Clean up all images not used in the last $hours_limit hours"
docker image prune --all --filter "until=${hours_limit}h" --force