File tree Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 1414# limitations under the License.
1515
1616FROM 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
1818WORKDIR /opt
1919RUN 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
2020WORKDIR /opt/hadoop
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616
1717DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
18- set -e
18+
19+ set -eu
20+
1921mkdir -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 -
2538fi
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 .
You can’t perform that action at this time.
0 commit comments