Multi-platform Docker image for Docker prune.
Service | Stats |
---|---|
GitHub | |
Docker Hub |
docker pull docker.io/xjokay/prune:latest
Tag | Description |
---|---|
latest | Latest release |
{release} | Specific release version, see available releases |
None
Directory | Description |
---|---|
/var/run/docker.sock | Needs to be mounted in order to be able to prune objects. |
ENV field | Req. / Opt. | Description |
---|---|---|
INTERVAL | Optional | Interval of pruning, default is 86400 seconds (24h). |
OBJECTS | Optional | Objects to be pruned, default is container volume image . Additionally network can be added if desired (see samples). |
OPTIONS | Optional | Additional options (default: none), e.g. --filter until=24h for objects created more than 1 day ago. |
services:
app:
image: docker.io/xjokay/prune:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- INTERVAL=86400
- "OBJECTS=container volume image network"
- "OPTIONS=--filter until=24h"
restart: always
docker run -d \
-v /var/run/docker.sock:/var/run/docker.sock \
-e INTERVAL=86400 \
-e "OBJECTS=container volume image network" \
-e "OPTIONS=--filter until=24h" \
docker.io/xjokay/prune:latest