Skip to content

Commit cc93b80

Browse files
committed
bugfix: set shell to fail before pipes
fixes https://github.com/hadolint/hadolint/wiki/DL4006 note: this wouldn't work with gverify as it exits with 1 if any supplied signature set mismatches. Since however we allow for this by checking a random OK as we already pin the hash too, this we can ignore gverify returning 1. If no signers are valid, we catch this in the script before attempting a shasum
1 parent 3cf2895 commit cc93b80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

1.14.5/bullseye/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG RLS_LIB=gnu
1414
ARG RLS_ARCH=
1515

1616
# configure the shell before the first RUN
17-
SHELL ["/bin/bash", "-ex", "-c"]
17+
SHELL ["/bin/bash", "-ex", "-o", "pipefail", "-c"]
1818

1919
# pin known sha256sums
2020
RUN echo f3bc387f393a0d55b6f653aef24febef6cb6f352fab2cbb0bae420bddcdacd1c dogecoin-1.14.5-aarch64-linux-gnu.tar.gz > SHASUMS \
@@ -52,7 +52,7 @@ RUN ARCHITECTURE=$(dpkg --print-architecture) \
5252
&& if [ "${RLS_ARCH}" = "" ]; then echo "Could not determine architecture" >&2; exit 1; fi \
5353
&& RLS_FILE_NAME="dogecoin-${RLS_VERSION}-${RLS_ARCH}-${RLS_OS}-${RLS_LIB}.tar.gz" \
5454
&& wget -q --show-progress --progress=bar:force:noscroll "${RLS_LOCATION}/${RLS_FILE_NAME}" \
55-
&& GITIAN_OUTPUT=$(gitian/bin/gverify --no-markup -d sigs -r "${SIG_PATH}" "${DESCRIPTOR_PATH}") \
55+
&& GITIAN_OUTPUT=$(gitian/bin/gverify --no-markup -d sigs -r "${SIG_PATH}" "${DESCRIPTOR_PATH}") || true \
5656
&& RANDOM_SIGNER=$(echo "${GITIAN_OUTPUT}" | grep OK | shuf -n 1 | sed s/:.*//) \
5757
&& if [ "${RANDOM_SIGNER}" = "" ]; then echo "No valid signers found" >&2; exit 1; fi \
5858
&& echo "Checking against signer: ${RANDOM_SIGNER}" \

0 commit comments

Comments
 (0)