Sign inSign up

izonder/prune

By izonder

•Updated over 8 years ago

Docker system prune manager

Image
1

1M+

izonder/prune repository overview

⁠izonder/prune

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

⁠How to use?

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"
⁠Run with docker-compose
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
⁠Disclaimer

Inspired by liske/docker-prune⁠

Tag summary

Content type

Image

Digest

Size

35.3 MB

Last updated

over 8 years ago

docker pull izonder/prune