periodically restart the registry container to avoid stale blobs [ci skip]
This commit is contained in:
parent
f221c9338a
commit
3f5a74b923
1 changed files with 2 additions and 1 deletions
3
main.tf
3
main.tf
|
|
@ -225,7 +225,8 @@ module "docker-registry-template" {
|
|||
)
|
||||
)
|
||||
),
|
||||
"( crontab -l 2>/dev/null; echo '0 3 * * 0 /usr/bin/docker exec registry registry garbage-collect /etc/docker/registry/config.yml' ) | crontab -",
|
||||
"( crontab -l 2>/dev/null; echo '0 3 * * 0 /usr/bin/docker exec registry registry garbage-collect -m /etc/docker/registry/config.yml' ) | crontab -",
|
||||
"( crontab -l 2>/dev/null; echo '0 * * * * /usr/bin/docker restart registry' ) | crontab -",
|
||||
"docker run -p 5000:5000 -p 5001:5001 -d --restart always --name registry -v /etc/docker-registry/config.yml:/etc/docker/registry/config.yml registry:2"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue