-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: transparency on package versions
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
- Loading branch information
Showing
5 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
NAMESPACE=${NAME:-selenium} | ||
FILTER_IMAGE_TAG=${FILTER_IMAGE_TAG:-"*"} | ||
OUTPUT_FILE=${OUTPUT_FILE:-"package_versions.txt"} | ||
|
||
# List all Docker images matching tag | ||
images=$(docker images --filter=reference=${NAMESPACE}'/*:'${FILTER_IMAGE_TAG} --format "{{.Repository}}:{{.Tag}}") | ||
|
||
# Check if there are any images | ||
if [ -z "$images" ]; then | ||
echo "No Docker images found." | ||
exit 1 | ||
fi | ||
|
||
echo -n "" >${OUTPUT_FILE} | ||
# Iterate through each image and generate SBOM | ||
for image in $images; do | ||
echo "Generating SBOM for image: $image" | ||
echo "==================== $image ====================" >>${OUTPUT_FILE} | ||
docker sbom $image >>${OUTPUT_FILE} | ||
echo "" >>${OUTPUT_FILE} | ||
done | ||
|
||
echo "SBOM generation completed for all images." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters