Add Docker image cleanup container to compose stack
Adds a lightweight docker:cli sidecar that prunes dangling images every 24 hours to prevent untagged image buildup from redeployments. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,14 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
|
|
||||||
|
docker-cleanup:
|
||||||
|
image: docker:cli
|
||||||
|
container_name: purrse-docker-cleanup
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
entrypoint: ["/bin/sh", "-c", "while true; do sleep 86400; docker image prune -f; done"]
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
purrse-db-data:
|
purrse-db-data:
|
||||||
purrse-plugins:
|
purrse-plugins:
|
||||||
|
|||||||
Reference in New Issue
Block a user