This is an automated email from the ASF dual-hosted git repository.
busbey pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1.3 by this push:
new 9e24fd7 HBASE-23023 upgrade shellcheck used in dockerfile (#625)
9e24fd7 is described below
commit 9e24fd7156abeee8197463d60af834e6dfd39e97
Author: Sean Busbey <[email protected]>
AuthorDate: Sat Sep 14 14:03:32 2019 -0500
HBASE-23023 upgrade shellcheck used in dockerfile (#625)
Signed-off-by: stack <[email protected]>
(cherry picked from commit 20d7da50e92dd73fa4b4ac491f32ed19fc257abe)
---
dev-support/docker/Dockerfile | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile
index b82b23b..e4daee2 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
@@ -116,17 +117,6 @@ RUN mkdir -p /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
####
RUN pip install pylint==1.9.2
@@ -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
###