docker-shellcheck/Dockerfile
2016-10-22 09:22:07 +01:00

48 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.

FROM ubuntu:16.04
MAINTAINER sparklyballs
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
# environment variables
ARG DEBIAN_FRONTEND="noninteractive"
ENV TERM="xterm" LANG="en_US" LANGUAGE="en_US:en"
# build packages as variable
ARG BUILD_PACKAGES="\
cabal-install \
git"
# Set the locale
RUN \
locale-gen en_US && \
# install build packages
apt-get update && \
apt-get install -y \
$BUILD_PACKAGES && \
# compile shellcheck
cabal update && \
git clone https://github.com/koalaman/shellcheck \
/tmp/shellcheck && \
cd /tmp/shellcheck && \
cabal install && \
export OLDPATH="$PATH" && \
export PATH="/root/.cabal/bin:$PATH" && \
cp $(which shellcheck) /usr/local/bin/ && \
ldd $(which shellcheck) | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /usr/local/lib/ && \
export PATH="$OLDPATH" && \
ldconfig /usr/local/lib && \
# cleanup
apt-get purge -y --auto-remove \
$BUILD_PACKAGES && \
rm -rf \
/root/.cabal \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*