Make bridgehead-update ignore commented out docker images

This commit is contained in:
Martin Lablans 2022-10-26 10:10:31 +02:00 committed by GitHub
parent aa595d2ea2
commit b18b98e792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ done
# Check docker updates # Check docker updates
log "INFO" "Checking for updates to running docker images ..." log "INFO" "Checking for updates to running docker images ..."
docker_updated="false" docker_updated="false"
for IMAGE in $(cat $PROJECT/docker-compose.yml | grep "image:" | sed -e 's_^.*image: \(.*\).*$_\1_g; s_\"__g'); do for IMAGE in $(cat $PROJECT/docker-compose.yml | grep -v "^#" | grep "image:" | sed -e 's_^.*image: \(.*\).*$_\1_g; s_\"__g'); do
log "INFO" "Checking for Updates of Image: $IMAGE" log "INFO" "Checking for Updates of Image: $IMAGE"
if docker pull $IMAGE | grep "Downloaded newer image"; then if docker pull $IMAGE | grep "Downloaded newer image"; then
CHANGE="Image $IMAGE updated." CHANGE="Image $IMAGE updated."