From 067ba46e608b6ab4f4811ce1126e7379364786f7 Mon Sep 17 00:00:00 2001 From: Valina Li Date: Tue, 15 Aug 2023 14:41:19 -0700 Subject: [PATCH] feat: fix hadolint problem Signed-off-by: Valina Li --- .hadolint.yml | 1 + fuzz_test/Dockerfile.fuzz | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.hadolint.yml b/.hadolint.yml index 2ab1018c46..4650d66a7f 100644 --- a/.hadolint.yml +++ b/.hadolint.yml @@ -3,6 +3,7 @@ ignored: - DL3008 - DL3018 - DL3059 + - DL3026 trustedRegistries: - docker.io diff --git a/fuzz_test/Dockerfile.fuzz b/fuzz_test/Dockerfile.fuzz index ec31509ad6..741b16df17 100644 --- a/fuzz_test/Dockerfile.fuzz +++ b/fuzz_test/Dockerfile.fuzz @@ -19,6 +19,10 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine RUN apk add --no-cache python3 py3-pip bash coreutils +# Set SHELL flags for RUN commands to allow -e and pipefail +# Rationale: https://github.com/hadolint/hadolint/wiki/DL4006 +SHELL ["/bin/ash", "-eo", "pipefail", "-c"] + WORKDIR /restler-fuzzer RUN wget -q -O - https://github.com/microsoft/restler-fuzzer/archive/refs/tags/v9.2.2.tar.gz | \ tar xz --strip-components 1 && \