docker-shellcheck/Dockerfile
2018-06-09 16:19:24 +01:00

46 lines
1.1 KiB
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.

############## build stage ##############
FROM ubuntu as buildstage
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
# build environment settings
ARG DEBIAN_FRONTEND="noninteractive"
RUN \
echo "**** install build packages ****" && \
apt-get update && \
apt-get install -y \
cabal-install \
curl \
ghc \
git && \
echo "**** compile shellcheck ****" && \
git clone https://github.com/koalaman/shellcheck /tmp/shellcheck && \
cd /tmp/shellcheck && \
cabal update && \
cabal install --dependencies-only && \
cabal build Paths_ShellCheck && \
ghc \
-idist/build/autogen \
-isrc \
-optl-pthread \
-optl-static \
--make \
shellcheck && \
strip --strip-all shellcheck
############## runtime stage ##############
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}"
# copy files from build stage
COPY --from=buildstage /tmp/shellcheck/shellcheck /usr/local/bin/