diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile index b82b23bc0fb2..e4daee2fa746 100644 --- a/dev-support/docker/Dockerfile +++ b/dev-support/docker/Dockerfile @@ -62,6 +62,7 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y \ python-pip \ rsync \ snappy \ + xz-utils \ zlib1g-dev \ wget @@ -115,17 +116,6 @@ RUN mkdir -p /opt/findbugs && \ tar xzf /opt/findbugs.tar.gz --strip-components 1 -C /opt/findbugs ENV FINDBUGS_HOME /opt/findbugs -#### -# Install shellcheck -#### -RUN apt-get -q install -y cabal-install -RUN mkdir /root/.cabal -RUN echo "remote-repo: hackage.fpcomplete.com:http://hackage.fpcomplete.com/" >> /root/.cabal/config -#RUN echo "remote-repo: hackage.haskell.org:http://hackage.haskell.org/" > /root/.cabal/config -RUN echo "remote-repo-cache: /root/.cabal/packages" >> /root/.cabal/config -RUN cabal update -RUN cabal install shellcheck --global - #### # Install pylint #### @@ -157,6 +147,24 @@ RUN gem install rubocop ### RUN gem install ruby-lint +#### +# Install shellcheck +# +# Include workaround for static linking bug +# https://github.com/koalaman/shellcheck/issues/1053 +### +RUN mkdir -p /opt/shellcheck && \ + curl -L -s -S \ + https://storage.googleapis.com/shellcheck/shellcheck-stable.linux.x86_64.tar.xz \ + -o /opt/shellcheck.tar.xz && \ + tar xJf /opt/shellcheck.tar.xz --strip-components 1 -C /opt/shellcheck && \ + touch /tmp/libc.so.6 && \ + echo '#!/bin/bash\n\ +LD_LIBRARY_PATH=/tmp /opt/shellcheck/shellcheck $@'\ +> /usr/bin/shellcheck && \ + chmod +x /usr/bin/shellcheck && \ + rm -f /opt/shellcheck.tar.xz + ### # Avoid out of memory errors in builds ###