Skip to content

Commit 8c36305

Browse files
committed
Dev Containers: Install hadolint from official image
1 parent c679949 commit 8c36305

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

.devcontainer/GHC.Dockerfile

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ FROM quay.io/benz0li/hlssi:${HLS_IMAGE_TAG} AS hlssi
2727

2828
FROM quay.io/benz0li/hlsi:latest AS hlsi
2929

30+
FROM ghcr.io/hadolint/hadolint:latest as hsi
31+
3032
FROM docker.io/koalaman/shellcheck:stable AS sci
3133

3234
FROM ${BUILD_ON_IMAGE}:${GHC_VERSION}${SUBTAG:+-}${SUBTAG}
@@ -42,19 +44,7 @@ RUN sysArch="$(uname -m)" \
4244
## Install terminal multiplexers
4345
&& apk add --no-cache screen tmux \
4446
## Install yamllint
45-
&& apk add --no-cache yamllint \
46-
## Install hadolint
47-
&& case "$sysArch" in \
48-
x86_64) tarArch="x86_64" ;; \
49-
aarch64) tarArch="arm64" ;; \
50-
*) echo "error: Architecture $sysArch unsupported"; exit 1 ;; \
51-
esac \
52-
&& apiResponse="$(curl -sSL \
53-
https://api.github.com/repos/hadolint/hadolint/releases/latest)" \
54-
&& downloadUrl="$(echo "$apiResponse" | grep -e \
55-
"browser_download_url.*Linux-$tarArch\"" | cut -d : -f 2,3 | tr -d \")" \
56-
&& echo "$downloadUrl" | xargs curl -sSLo /usr/local/bin/hadolint \
57-
&& chmod 755 /usr/local/bin/hadolint
47+
&& apk add --no-cache yamllint
5848

5949
## Update environment
6050
ARG USE_ZSH_FOR_ROOT
@@ -97,6 +87,8 @@ RUN if [ -n "$USE_ZSH_FOR_ROOT" ]; then \
9787
COPY --from=hlssi /usr/local /usr/local
9888
## Install HLint
9989
COPY --from=hlsi /usr/local /usr/local
90+
## Install Haskell Dockerfile Linter
91+
COPY --from=hsi /bin/hadolint /usr/local/bin
10092
## Install ShellCheck
10193
COPY --from=sci --chown=root:root /bin/shellcheck /usr/local/bin
10294

.hadolint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ignored:
2+
- DL3003
3+
- DL3006
4+
- DL3007
5+
- DL3018

0 commit comments

Comments
 (0)