Initial commit
This commit is contained in:
14
scripts/check-base.sh
Normal file
14
scripts/check-base.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASE=$(grep "^FROM" Dockerfile | head -1 | awk '{print $2}')
|
||||
echo "Base image: $BASE"
|
||||
|
||||
docker pull $BASE
|
||||
LOCAL_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' $BASE)
|
||||
|
||||
REMOTE_DIGEST=$(skopeo inspect docker://$BASE | jq -r .Digest)
|
||||
|
||||
if [ "$LOCAL_DIGEST" != "$REMOTE_DIGEST" ]; then
|
||||
echo "Base image updated!"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user