tree: d6f800f6f2879ae68c2fefe254849b6a34eb2fc2 [path history] [tgz]
  1. docker-cleanup-dangling-images.service
  2. docker-cleanup-dangling-images.timer
  3. README.md
crowdstf/docker/extras/README.md

Docker build extras

Optional utilities for builders.

docker-cleanup-dangling-images

Daily cleanup of dangling (untagged) images. If you don't clean up old images you may eventually run out of disk space.

First, copy the unit files into your build machine's /etc/systemd/system/ folder.

cp docker-cleanup-dangling-images.{service,timer} /etc/systemd/system/

Alternatively scp can be much easier depending on your setup:

scp docker-cleanup-dangling-images.{service,timer} root@a.b.c.d:/etc/systemd/system

Now all you need to do is enable and start the timer.

systemctl enable --now docker-cleanup-dangling-images.timer

You can also trigger the cleanup job manually:

systemctl start docker-cleanup-dangling-images