Skip to content

Commit

Permalink
YETUS-1230. hadolint is not executable on arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
ndimiduk committed Jun 19, 2023
1 parent 5621c2a commit 345657a
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions precommit/src/main/shell/test-patch-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,22 @@ RUN curl -sSL \
####
# Install hadolint (dockerfile lint)
####
FROM yetusbase AS yetushadolint
FROM yetusbase as yetushadolint_arm64
ARG HADOLINT_VERSION=2.12.0
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN if [[ "$(uname -m)" == "x86_64" ]]; then curl -sSL \
https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-Linux-"$(uname -m)" \
RUN curl -sSl \
https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-Linux-arm64 \
-o /bin/hadolint \
&& chmod a+rx /bin/hadolint; \
else touch /bin/hadolint; fi
&& chmod a+rx /bin/hadolint
FROM yetusbase as yetushadolint_amd64
ARG HADOLINT_VERSION=2.12.0
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -sSl \
https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-Linux-x86_64 \
-o /bin/hadolint \
&& chmod a+rx /bin/hadolint
ARG TARGETARCH
FROM yetushadolint_$TARGETARCH AS yetushadolint

Check failure on line 163 in precommit/src/main/shell/test-patch-docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build

hadolint: DL3006 warning: Always tag the version of an image explicitly

####
# Install buf (protobuf lint)
Expand Down

0 comments on commit 345657a

Please sign in to comment.