Skip to content

Dev Containers: Install hadolint from official image #6769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions .devcontainer/GHC.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ FROM quay.io/benz0li/hlssi:${HLS_IMAGE_TAG} AS hlssi

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

FROM ghcr.io/hadolint/hadolint:latest as hsi

FROM docker.io/koalaman/shellcheck:stable AS sci

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

## Update environment
ARG USE_ZSH_FOR_ROOT
Expand Down Expand Up @@ -97,6 +87,8 @@ RUN if [ -n "$USE_ZSH_FOR_ROOT" ]; then \
COPY --from=hlssi /usr/local /usr/local
## Install HLint
COPY --from=hlsi /usr/local /usr/local
## Install Haskell Dockerfile Linter
COPY --from=hsi /bin/hadolint /usr/local/bin
## Install ShellCheck
COPY --from=sci --chown=root:root /bin/shellcheck /usr/local/bin

Expand Down
5 changes: 5 additions & 0 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignored:
- DL3003
- DL3006
- DL3007
- DL3018
Loading