From 20c56a05587ed88bab7d89675f4329f79746ed48 Mon Sep 17 00:00:00 2001 From: Login Victor Date: Tue, 11 May 2021 13:58:06 +0300 Subject: [PATCH] docker-registry: add cron for delete untag images Signed-off-by: Login Victor --- ops/docker-compose/tooling/docker-registry.yaml | 1 + ops/docker-compose/tooling/registry/cron | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 ops/docker-compose/tooling/registry/cron diff --git a/ops/docker-compose/tooling/docker-registry.yaml b/ops/docker-compose/tooling/docker-registry.yaml index 3885a0dca47..4bc92b2b96f 100644 --- a/ops/docker-compose/tooling/docker-registry.yaml +++ b/ops/docker-compose/tooling/docker-registry.yaml @@ -20,3 +20,4 @@ services: volumes: - /data/registry:/data:Z - ./ops/cert/gitlab:/certs:Z + - ./ops/docker-compose/tooling/registry/cron:/etc/crontabs/root:Z diff --git a/ops/docker-compose/tooling/registry/cron b/ops/docker-compose/tooling/registry/cron new file mode 100644 index 00000000000..58733ceb43d --- /dev/null +++ b/ops/docker-compose/tooling/registry/cron @@ -0,0 +1,8 @@ +# do daily/weekly/monthly maintenance +# min hour day month weekday command +*/15 * * * * run-parts /etc/periodic/15min +0 * * * * run-parts /etc/periodic/hourly +0 2 * * * run-parts /etc/periodic/daily +0 3 * * 6 run-parts /etc/periodic/weekly +0 5 1 * * run-parts /etc/periodic/monthly +0 0 * * * registry garbage-collect -m=true /etc/docker/registry/config.yml