Skip to content

Commit

Permalink
Fixed logic for when a tag does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitawootten-nist committed Apr 21, 2023
1 parent 2c4b21f commit 7db27d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/pull-oscal-env-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ OUTPUT_IMAGE="oscal-common-env"
OUTPUT_TAG="selected"
OUTPUT_REF="${OUTPUT_IMAGE}:${OUTPUT_TAG}"

for REF in "${SOURCE_IMAGE}:${TAGS[@]}"; do
for TAG in "${TAGS[@]}"; do
REF="${SOURCE_IMAGE}:${TAG}"
docker pull "${REF}" && {
docker tag "${REF}" "${OUTPUT_REF}"
echo "Successsfully pulled ${REF} and retagged it as ${OUTPUT_REF}"
Expand Down

0 comments on commit 7db27d4

Please sign in to comment.