Periodically run 'docker-system-prune'
440
Executes the docker system prune command periodically.
This image allows you to program automatically when a prune will be done on your hosts. The main advantage over external solutions like a cron job is that you can launch it in a cluster easily: "fire & forget"
Note: You need to mount the docker socket as a volume to allow the command to be executed in the host.
Unlike the upstream image this was based on, this image runs continuously. It's probably better to do it @softonic's way, but I'm one person running a very small cluster, and this is the easiest way for me to both run this and examine its logs on my rancher infrastructure.
| Variable | Default Value | Description |
|---|---|---|
DOCKER_SYSTEM_PRUNE_ARGS | --force | The arguments to pass to docker system prune |
DOCKER_SYSTEM_PRUNE_SLEEP | 86400 | How long to sleep between runs |
When running this service on a Rancher cluster here are a few tips:
/var/run/docker.sock:/var/run/docker.sockAs it executes the docker system prune command this can work only in nodes with Docker versions >=1.13
Content type
Image
Digest
Size
35.2 MB
Last updated
over 8 years ago
docker pull skullydazed/docker-system-prune