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

weichiu pushed a commit to branch docker-hadoop-3.4
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/docker-hadoop-3.4 by this push:
     new 7faf4049887 HADOOP-19322. Upgrade hadoop3 docker scripts to 3.4.1
7faf4049887 is described below

commit 7faf40498875f8f1bb4480a252cdfa4b7bda1f75
Author: Doroszlai, Attila <adorosz...@apache.org>
AuthorDate: Tue Oct 29 09:01:22 2024 +0100

    HADOOP-19322. Upgrade hadoop3 docker scripts to 3.4.1
    
    (cherry picked from commit 185fd5fb3cdfb0dcf72b271bf99217c358d89690)
---
 Dockerfile |  2 +-
 build.sh   | 31 +++++++++++++++++++++++--------
 2 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index ee8d1ddec40..f3618dacc15 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 FROM apache/hadoop-runner
-ARG 
HADOOP_URL=https://dlcdn.apache.org/hadoop/common/hadoop-3.4.0/hadoop-3.4.0.tar.gz
+ARG 
HADOOP_URL=https://dlcdn.apache.org/hadoop/common/hadoop-3.4.1/hadoop-3.4.1.tar.gz
 WORKDIR /opt
 RUN sudo rm -rf /opt/hadoop && curl -LSs -o hadoop.tar.gz $HADOOP_URL && tar 
zxf hadoop.tar.gz && rm hadoop.tar.gz && mv hadoop* hadoop && rm -rf 
/opt/hadoop/share/doc
 WORKDIR /opt/hadoop
diff --git a/build.sh b/build.sh
index 78a7f833ced..74955b4e565 100755
--- a/build.sh
+++ b/build.sh
@@ -15,13 +15,28 @@
 # limitations under the License.
 
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-set -e
+
+set -eu
+
 mkdir -p build
-if [ ! -d "$DIR/build/apache-rat-0.15" ]; then
-       curl -LSs 
https://dlcdn.apache.org/creadur/apache-rat-0.15/apache-rat-0.15-bin.tar.gz -o 
"$DIR/build/apache-rat.tar.gz"
-       cd $DIR/build
-       tar zvxf apache-rat.tar.gz
-       cd -
+
+rat_version=0.16.1
+
+if [ ! -d "$DIR/build/apache-rat-${rat_version}" ]; then
+  
url="https://dlcdn.apache.org/creadur/apache-rat-${rat_version}/apache-rat-${rat_version}-bin.tar.gz";
+  output="$DIR/build/apache-rat.tar.gz"
+  if type wget 2> /dev/null; then
+    wget -O "$output" "$url"
+  elif type curl 2> /dev/null; then
+    curl -LSs -o "$output" "$url"
+  else
+    exit 1
+  fi
+  cd $DIR/build
+  tar zvxf apache-rat.tar.gz
+  cd -
 fi
-java -jar $DIR/build/apache-rat-0.15/apache-rat-0.15.jar $DIR -e public -e 
apache-rat-0.15 -e .git -e .gitignore
-docker build -t apache/hadoop:3.4 -t apache/hadoop:3.4.0 .
+
+java -jar $DIR/build/apache-rat-${rat_version}/apache-rat-${rat_version}.jar 
$DIR -e .dockerignore -e build -e .git -e .gitignore
+
+docker build --build-arg HADOOP_URL -t apache/hadoop:dev .


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to