docker-shellcheck/Dockerfile
2017-05-25 23:08:04 +01:00

40 lines
837 B
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM scratch
ADD rootfs.tar.xz /
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
# install build packages
RUN \
apk add --no-cache --virtual=build-dependencies \
binutils-gold \
ghc \
libffi-dev \
musl-dev && \
apk add --no-cache --virtual=build-dependencies \
--repository http://nl.alpinelinux.org/alpine/edge/testing \
cabal && \
# compile shellcheck
cabal update && \
cabal install ShellCheck && \
# install shellcheck
cp /root/.cabal/bin/shellcheck /usr/local/bin/ && \
ldd \
/root/.cabal/bin/shellcheck | grep "=> /" \
| awk '{print $3}' | xargs -I '{}' cp -v '{}' \
/usr/local/lib/ && \
ldconfig /usr/local/lib && \
# cleanup
apk del --purge \
build-dependencies && \
rm -rf \
/root \
/tmp/* && \
mkdir -p \
/root