mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Change docker inspect to variable to speed it up
This commit is contained in:
@@ -112,7 +112,11 @@ update_docker_containers() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Dump our hash values
|
# Dump our hash values
|
||||||
docker inspect $CONTAINER_REGISTRY/$IMAGEREPO/$i:$VERSION | jq '.[0].Created, .[0].RepoDigests, .[0].RootFS.Layers' > $SIGNPATH/$i.txt
|
DOCKERINSPECT=$(docker inspect $CONTAINER_REGISTRY/$IMAGEREPO/$i:$VERSION)
|
||||||
|
|
||||||
|
echo "$DOCKERINSPECT" | jq '.[0].RepoDigests[] | select(. | contains("$CONTAINER_REGISTRY"))' > $SIGNPATH/$i.txt
|
||||||
|
echo "$DOCKERINSPECT" | jq '.[0].Created, .[0].RootFS.Layers' >> $SIGNPATH/$i.txt
|
||||||
|
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo "Unable to inspect $i:$VERSION"
|
echo "Unable to inspect $i:$VERSION"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -130,4 +134,4 @@ update_docker_containers() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user