Skip to content

Commit ec3ce1a

Browse files
committed
Tell skopeo where to find docker creds
1 parent 2b11c12 commit ec3ce1a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

bin/pin-digest.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ IMAGE_REF=$1
55
DOCKER_FILE=$2
66
MESSAGE=${3:-""}
77

8+
DOCKER_AUTH=${DOCKER_AUTH:-"etc/credentials/docker/config.json"}
89
NO_COMMIT=${NO_COMMIT:-""}
910

10-
IMAGE_DIGEST="$(skopeo inspect --no-tags docker://${IMAGE_REF} --format '{{.Digest}}')"
11+
IMAGE_DIGEST="$(skopeo inspect --no-tags --authfile "$DOCKER_AUTH" docker://${IMAGE_REF} --format '{{.Digest}}')"
1112

1213
REQUIRED="FROM ${IMAGE_REF}@${IMAGE_DIGEST}"
1314
CURRENT=$( grep -E "^FROM ${IMAGE_REF}" "${DOCKER_FILE}" )

0 commit comments

Comments
 (0)