shellcheck/Dockerfile
Stephan Schnabel b8c4a9c224
All checks were successful
ci/woodpecker/push/dockerhub Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
Initial draft of plugin.
2025-06-17 20:06:21 +02:00

19 lines
1,005 B
Docker

# ignore pipefail because
# bash is non-default location https://github.com/tianon/docker-bash/issues/29
# hadolint only uses default locations https://github.com/hadolint/hadolint/issues/977
# hadolint global ignore=DL4006
FROM docker.io/library/bash:5.2.37@sha256:01a15c6f48f6a3c08431cd77e11567823530b18159889dca3b7309b707beef91
SHELL ["/usr/local/bin/bash", "-u", "-e", "-o", "pipefail", "-c"]
RUN ARCH=$(uname -m) && \
[[ $ARCH == x86_64 ]] && export SUFFIX=x86_64; \
[[ $ARCH == aarch64 ]] && export SUFFIX=aarch64; \
[[ -z ${SUFFIX:-} ]] && echo "Unknown arch: $ARCH" && exit 1; \
wget -q "https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.$SUFFIX.tar.xz" --output-document=- | \
tar --xz --extract --to-stdout shellcheck-v0.10.0/shellcheck --strip-components=1 > /usr/local/bin/shellcheck && \
chmod 555 /usr/local/bin/shellcheck
COPY --chmod=555 entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
USER 1000:1000