Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added storage of digest hash to reduce pulling if the image has not been updated #4

Open
JordanPlayz158 opened this issue Mar 2, 2024 · 0 comments

Comments

@JordanPlayz158
Copy link

diff docker-image-extract.original docker-image-extract 
231a232,237
> previousDigest=$(cat "$OUT_DIR/digest")
> if [ "$digest" = "$previousDigest" ]; then
>   echo "Docker digest is equal to previously extracted digest, exiting..."
>   exit 2
> fi
> 
286a293,295
> 
> echo "$digest" > "$OUT_DIR/digest"
> echo "Digest stored in $OUT_DIR/digest"

This is nice for automation of updating images/applications that only distribute binaries through a docker image, it not only makes docker hub get pulled from less if you do have a system like I do but it also exits with a certain code so you know it didn't error but it didn't get any new files so you don't need to restart the applications in question.

I would've made a repo but it was such a small change so I didn't think it was necessary. If needed, I can make a repo with the change and make a pull request instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant