Update dockcheck.sh

added a simple progress indicator ......
This commit is contained in:
mag37 2023-01-18 14:56:48 +01:00 committed by GitHub
parent 61d0ff7c38
commit 929df7b376
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,6 +30,7 @@ fi
### Check the image-hash of every running container VS the registry ### Check the image-hash of every running container VS the registry
for i in $(docker ps --format '{{.Names}}') for i in $(docker ps --format '{{.Names}}')
do do
printf ". "
RepoUrl=$(docker inspect $i --format='{{.Config.Image}}') RepoUrl=$(docker inspect $i --format='{{.Config.Image}}')
LocalHash=$(docker image inspect $RepoUrl --format '{{.RepoDigests}}' | sed -e 's/.*sha256/sha256/' -e 's/\]$//') LocalHash=$(docker image inspect $RepoUrl --format '{{.RepoDigests}}' | sed -e 's/.*sha256/sha256/' -e 's/\]$//')
RegHash=$(./regctl image digest --list $RepoUrl) RegHash=$(./regctl image digest --list $RepoUrl)