Install a docker registry GC cron

This installs a daily cron job for garbage collecting the docker
registry. Note that we need to orphan blobs by deleting their tags for
this to result in any cleaned up blobs. This will be done in a separate
change.

Change-Id: I85c87ee3b3a375e0141ef9b15a0b9e56c0938bd8
This commit is contained in:
Clark Boylan 2019-04-15 12:08:17 -07:00
parent df8452a21c
commit 671250095d
1 changed files with 7 additions and 0 deletions

View File

@ -44,3 +44,10 @@
shell:
cmd: docker-compose up -d
chdir: /etc/registry-docker/
- name: Install cron to garbage collect the registry daily
cron:
name: "docker registry garbage-collect"
minute: "0"
hour: "0"
job: "/usr/bin/docker exec registrydocker_registry_1 registry garbage-collect /etc/docker/registry/config.yml > /dev/null"