[ci skip] Fix registry tag cleanup for pull-through cache
- Rewrite cleanup script to use filesystem deletion (shutil.rmtree) since proxy registries don't support DELETE via API (405) - Fix cron entry to invoke with python3
This commit is contained in:
parent
4671ef34a3
commit
375e3e115a
2 changed files with 21 additions and 45 deletions
2
main.tf
2
main.tf
|
|
@ -281,7 +281,7 @@ module "docker-registry-template" {
|
|||
format("echo %s | base64 -d > /etc/docker-registry/cleanup-tags.sh && chmod +x /etc/docker-registry/cleanup-tags.sh",
|
||||
base64encode(file("${path.root}/modules/docker-registry/cleanup-tags.sh"))
|
||||
),
|
||||
"( crontab -l 2>/dev/null; echo '0 2 * * * /etc/docker-registry/cleanup-tags.sh 10 >> /var/log/registry-cleanup.log 2>&1' ) | crontab -",
|
||||
"( crontab -l 2>/dev/null; echo '0 2 * * * python3 /etc/docker-registry/cleanup-tags.sh 10 >> /var/log/registry-cleanup.log 2>&1' ) | crontab -",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue