You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2022/11/03 10:06:19 UTC

[hbase] branch master updated: HBASE-27460 Fix the hadolint errors after HBASE-27456 (#4860)

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new e7d1a6a0525 HBASE-27460 Fix the hadolint errors after HBASE-27456 (#4860)
e7d1a6a0525 is described below

commit e7d1a6a0525fcadf1cd0294d7a09af432a1af853
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Thu Nov 3 18:06:10 2022 +0800

    HBASE-27460 Fix the hadolint errors after HBASE-27456 (#4860)
    
    Signed-off-by: Guanghao Zhang <zg...@apache.org>
---
 dev-support/Dockerfile                         |  4 ++--
 dev-support/create-release/hbase-rm/Dockerfile |  5 ++---
 dev-support/docker/Dockerfile                  | 22 +++++++++++-----------
 dev-support/hbase_docker/Dockerfile            | 21 ++++++++++++---------
 4 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/dev-support/Dockerfile b/dev-support/Dockerfile
index 44822e9fb44..39fd5645e88 100644
--- a/dev-support/Dockerfile
+++ b/dev-support/Dockerfile
@@ -29,5 +29,5 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y update \
       curl='7.81.0-*' \
       python3-pip='22.0.2+dfsg-*' \
     && apt-get clean \
-    && rm -rf /var/lib/apt/lists/*
-RUN pip3 install -r /hbase/dev-support/python-requirements.txt
+    && rm -rf /var/lib/apt/lists/* \
+    && pip3 install --no-cache-dir -r /hbase/dev-support/python-requirements.txt
diff --git a/dev-support/create-release/hbase-rm/Dockerfile b/dev-support/create-release/hbase-rm/Dockerfile
index 10cd1a8cb78..5cc322b46f6 100644
--- a/dev-support/create-release/hbase-rm/Dockerfile
+++ b/dev-support/create-release/hbase-rm/Dockerfile
@@ -42,8 +42,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y update \
   && apt-get clean \
   && rm -rf /var/lib/apt/lists/* \
   && update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java \
-  && pip3 install \
-    python-dateutil==2.8.2
+  && pip3 install --no-cache-dir python-dateutil==2.8.2
 
 SHELL ["/bin/bash", "-o", "pipefail", "-c"]
 
@@ -72,7 +71,7 @@ ENV YETUS_HOME /opt/yetus
 ARG UID
 ARG RM_USER
 RUN groupadd hbase-rm && \
-    useradd --create-home --shell /bin/bash -p hbase-rm -u $UID $RM_USER && \
+    useradd --create-home -l --shell /bin/bash -p hbase-rm -u $UID $RM_USER && \
     mkdir /home/$RM_USER/.gnupg && \
     chown -R $RM_USER:hbase-rm /home/$RM_USER && \
     chmod -R 700 /home/$RM_USER
diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile
index e3089e9beea..0d73d95e306 100644
--- a/dev-support/docker/Dockerfile
+++ b/dev-support/docker/Dockerfile
@@ -55,17 +55,17 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \
     shellcheck='0.8.0-*' \
     && \
     apt-get clean && \
-    rm -rf /var/lib/apt/lists/*
-
-RUN python3 -mpip install --upgrade pip && \
-  python3 -mpip install pylint==2.15.5
-
-RUN gem install --no-document \
-  rake:13.0.3 \
-  rubocop:1.37.1 \
-  ruby-lint:2.3.1
-
-RUN locale-gen en_US.UTF-8
+    rm -rf /var/lib/apt/lists/* \
+    && \
+    python3 -mpip install --upgrade pip && \
+    python3 -mpip install pylint==2.15.5 \
+    && \
+    gem install --no-document \
+    rake:13.0.3 \
+    rubocop:1.37.1 \
+    ruby-lint:2.3.1 \
+    && \
+    locale-gen en_US.UTF-8
 ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
 
 ##
diff --git a/dev-support/hbase_docker/Dockerfile b/dev-support/hbase_docker/Dockerfile
index 7aceb46184b..afcd1c24584 100644
--- a/dev-support/hbase_docker/Dockerfile
+++ b/dev-support/hbase_docker/Dockerfile
@@ -25,9 +25,9 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \
     locales='2.27-*' \
     && \
     apt-get clean && \
-    rm -rf /var/lib/apt/lists/*
-
-RUN locale-gen en_US.UTF-8
+    rm -rf /var/lib/apt/lists/* \
+    && \
+    locale-gen en_US.UTF-8
 ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
 
 FROM BASE_IMAGE AS MAVEN_DOWNLOAD_IMAGE
@@ -74,12 +74,15 @@ ENV PATH "${JAVA_HOME}/bin:${MAVEN_HOME}/bin:${PATH}"
 
 # Pull down HBase and build it into /root/hbase-bin.
 WORKDIR /root
-RUN git clone https://gitbox.apache.org/repos/asf/hbase.git -b master
-RUN mvn clean install -DskipTests assembly:single -f ./hbase/pom.xml
-RUN mkdir -p hbase-bin
-RUN find /root/hbase/hbase-assembly/target -iname '*.tar.gz' -not -iname '*client*' \
-  | head -n 1 \
-  | xargs -I{} tar xzf {} --strip-components 1 -C /root/hbase-bin
+RUN git clone https://gitbox.apache.org/repos/asf/hbase.git -b master \
+    && \
+    mvn clean install -DskipTests assembly:single -f ./hbase/pom.xml \
+    && \
+    mkdir -p hbase-bin \
+    && \
+    find /root/hbase/hbase-assembly/target -iname '*.tar.gz' -not -iname '*client*' \
+    | head -n 1 \
+    | xargs -I{} tar xzf {} --strip-components 1 -C /root/hbase-bin
 
 # Set HBASE_HOME, add it to the path, and start HBase.
 ENV HBASE_HOME /root/hbase-bin