Docker system prune manager. It uses the command by default:
docker system prune -f
Environment variables (optional):
ACTION - action (system, container, image, volume), default value system
SLEEP - idle timeout
Simple CLI run:
docker run \
--rm \
-it \
-v /var/run/docker.sock:/var/run/docker.sock \
izonder/prune
You can add extra settings, e.g. to remove ALL IMAGES which were created more than 24 hours ago:
docker run \
--rm \
-it \
-v /var/run/docker.sock:/var/run/docker.sock \
-e ACTION=image \
izonder/prune \
-a --filter "until=24h"
version: '2'
services:
docker-prune:
image: izonder/prune
environment:
ACTION: image
SLEEP: 86400
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command:
- '-a'
- '--filter "until=24h"'
deploy:
mode: global
Inspired by liske/docker-prune
Content type
Image
Digest
Size
35.3 MB
Last updated
over 8 years ago
docker pull izonder/prune