-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "feat: run blob reaper every 72h" (#158)"
This reverts commit 4366d09.
- Loading branch information
Showing
7 changed files
with
61 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
FROM registry:2.7.1 | ||
|
||
ADD ./entrypoint.sh /entrypoint.sh | ||
ADD ./config.yml /etc/docker/registry/config.yml | ||
ADD ./config.yml /etc/docker/registry/config.tmpl.yml | ||
ADD ./garbage-collect.sh /garbage-collect.sh | ||
|
||
# entrypoint.sh will copy config.tmpl.yml to config.yml and replace variables | ||
RUN rm -f /etc/docker/registry/config.yml | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["/etc/docker/registry/config.yml"] | ||
CMD ["registry", "serve", "/etc/docker/registry/config.yml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# built from https://github.com/sgalsaleh/distribution/tree/custom-garbage-collect | ||
FROM replicated/registry-blob-reap:latest | ||
|
||
ADD ./entrypoint.sh /entrypoint.sh | ||
ADD ./config.yml /etc/docker/registry/config.tmpl.yml | ||
ADD ./garbage-collect.sh /garbage-collect.sh | ||
|
||
# entrypoint.sh will copy config.tmpl.yml to config.yml and replace variables | ||
RUN rm -f /etc/docker/registry/config.yml | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
CMD ["/garbage-collect.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
#!/bin/sh | ||
|
||
echo "Script started" | ||
|
||
while true; do | ||
sleep 1m | ||
echo "Starting garbage collection..." | ||
registry garbage-collect /etc/docker/registry/config.yml || true | ||
echo "Garbage collection finished" | ||
sleep 72h # every 3 days | ||
done |