Sign inSign up

ogulcanaydogan/docker-gc

By ogulcanaydogan

Updated 8 months ago

Automated Docker garbage collection for images, containers, volumes

Image
0

848

ogulcanaydogan/docker-gc repository overview

Docker GC

Automated Docker garbage collection — clean up unused images, containers, and volumes.

Quick Start

docker run -v /var/run/docker.sock:/var/run/docker.sock ogulcanaydogan/docker-gc

Features

  • Remove dangling images
  • Clean stopped containers
  • Prune unused volumes and networks
  • Age-based filtering (keep recent images)
  • Dry-run mode
  • Scheduled cleanup via cron

Environment Variables

VariableDescriptionDefault
GRACE_PERIOD_HOURSKeep images newer than this24
DRY_RUNPreview without deletingfalse
CLEAN_IMAGESRemove unused imagestrue
CLEAN_CONTAINERSRemove stopped containerstrue
CLEAN_VOLUMESRemove unused volumesfalse
SCHEDULECron schedule (e.g., 0 3 * * *)-

License

MIT

Tag summary

Content type

Image

Digest

sha256:d7e39dd9a

Size

60.5 MB

Last updated

8 months ago

docker pull ogulcanaydogan/docker-gc