Skip to content

Commit 185fd5f

Browse files
committed
HADOOP-19322. Upgrade hadoop3 docker scripts to 3.4.1
1 parent 8af16fb commit 185fd5f

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515

1616
FROM apache/hadoop-runner
17-
ARG HADOOP_URL=https://dlcdn.apache.org/hadoop/common/hadoop-3.4.0/hadoop-3.4.0.tar.gz
17+
ARG HADOOP_URL=https://dlcdn.apache.org/hadoop/common/hadoop-3.4.1/hadoop-3.4.1.tar.gz
1818
WORKDIR /opt
1919
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
2020
WORKDIR /opt/hadoop

build.sh

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,28 @@
1515
# limitations under the License.
1616

1717
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
18-
set -e
18+
19+
set -eu
20+
1921
mkdir -p build
20-
if [ ! -d "$DIR/build/apache-rat-0.15" ]; then
21-
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"
22-
cd $DIR/build
23-
tar zvxf apache-rat.tar.gz
24-
cd -
22+
23+
rat_version=0.16.1
24+
25+
if [ ! -d "$DIR/build/apache-rat-${rat_version}" ]; then
26+
url="https://dlcdn.apache.org/creadur/apache-rat-${rat_version}/apache-rat-${rat_version}-bin.tar.gz"
27+
output="$DIR/build/apache-rat.tar.gz"
28+
if type wget 2> /dev/null; then
29+
wget -O "$output" "$url"
30+
elif type curl 2> /dev/null; then
31+
curl -LSs -o "$output" "$url"
32+
else
33+
exit 1
34+
fi
35+
cd $DIR/build
36+
tar zvxf apache-rat.tar.gz
37+
cd -
2538
fi
26-
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
27-
docker build -t apache/hadoop:3.4 -t apache/hadoop:3.4.0 .
39+
40+
java -jar $DIR/build/apache-rat-${rat_version}/apache-rat-${rat_version}.jar $DIR -e .dockerignore -e build -e .git -e .gitignore
41+
42+
docker build --build-arg HADOOP_URL -t apache/hadoop:dev .

0 commit comments

Comments
 (0)