@@ -35,8 +35,7 @@ function exit_with_usage() {
35
35
}
36
36
37
37
REGISTRY=" docker.io/library"
38
- HADOOP_VERSION=2.8.5
39
- HADOOP_SHORT_VERSION=$( echo $HADOOP_VERSION | awk -F " ." ' {print $1"."$2}' )
38
+ HADOOP_VERSION=3.2.0.13-SNAPSHOT
40
39
AUTHOR=$( whoami)
41
40
# If you are based in China, you could pass --apache-mirror <a_mirror_url> when building this.
42
41
APACHE_MIRROR=" https://dlcdn.apache.org"
@@ -92,6 +91,8 @@ while (( "$#" )); do
92
91
shift
93
92
done
94
93
94
+ HADOOP_SHORT_VERSION=$( echo $HADOOP_VERSION | awk -F " ." ' {print $1"."$2}' )
95
+
95
96
if [ -z " $BASE_IMAGE " ]; then
96
97
echo " start building base image: uniffle-base"
97
98
docker build -t " uniffle-base:latest" \
@@ -101,14 +102,21 @@ else
101
102
echo " using base image(${BASE_IMAGE} ) to build rss server"
102
103
fi
103
104
105
+ if test -f " /root/.wgetrc" ; then
106
+ wget https://nexus.hops.works/repository/hopshadoop/hops-$HADOOP_VERSION_EE .tgz
107
+ else
108
+ wget https://repo.hops.works/master/hops-$HADOOP_VERSION .tgz
109
+ fi
104
110
105
- HADOOP_FILE=hadoop-${HADOOP_VERSION} .tar.gz
106
- ARCHIVE_HADOOP_URL=https://archive.apache.org/dist/hadoop/core/hadoop-${HADOOP_VERSION} /${HADOOP_FILE}
107
- HADOOP_URL=${APACHE_MIRROR} /hadoop/core/hadoop-${HADOOP_VERSION} /${HADOOP_FILE}
108
- echo " HADOOP_URL is either ${HADOOP_URL} or ${ARCHIVE_HADOOP_URL} "
109
- if [ ! -e " $HADOOP_FILE " ]; \
110
- then wget " ${HADOOP_URL} " || wget " $ARCHIVE_HADOOP_URL " ; \
111
- else echo " ${HADOOP_FILE} has been downloaded" ; \
111
+ HADOOP_FILE=hops-$HADOOP_VERSION .tgz
112
+ if [ ! -e " $HADOOP_FILE " ]; then
113
+ if test -f " /root/.wgetrc" ; then
114
+ wget https://nexus.hops.works/repository/hopshadoop/$HADOOP_FILE
115
+ else
116
+ wget https://repo.hops.works/master/$HADOOP_FILE
117
+ fi
118
+ else
119
+ echo " ${HADOOP_FILE} has been downloaded" ;
112
120
fi
113
121
114
122
RSS_DIR=../../..
@@ -126,17 +134,20 @@ cp "$RSS_DIR/$RSS_FILE" .
126
134
127
135
GIT_BRANCH=$( git rev-parse --abbrev-ref HEAD)
128
136
GIT_COMMIT=$( git describe --dirty --always --tags | sed ' s/-/./g' )
129
- echo " image version: ${IMAGE_VERSION:= $RSS_VERSION -$GIT_COMMIT } "
130
137
IMAGE=$REGISTRY /rss-server:$IMAGE_VERSION
138
+ IMAGE_VERSION=$( cat $RSS_DIR /version.txt | awk ' {$1=$1; print}' | sed ' /^$/d' )
139
+ echo " image version: ${IMAGE_VERSION} "
140
+ IMAGE=$REGISTRY /rss:$IMAGE_VERSION
131
141
echo " building image: $IMAGE "
132
- docker build --network=host -t " $IMAGE " \
142
+ DOCKER_BUILDKIT=1 docker build --network=host -t " $IMAGE " \
133
143
--build-arg RSS_VERSION=" $RSS_VERSION " \
134
144
--build-arg HADOOP_VERSION=" $HADOOP_VERSION " \
135
145
--build-arg HADOOP_SHORT_VERSION=" $HADOOP_SHORT_VERSION " \
136
146
--build-arg AUTHOR=" $AUTHOR " \
137
147
--build-arg GIT_COMMIT=" $GIT_COMMIT " \
138
148
--build-arg GIT_BRANCH=" $GIT_BRANCH " \
139
149
--build-arg BASE_IMAGE=" $BASE_IMAGE " \
150
+ --build-arg HADOOP_FILE=" $HADOOP_FILE " \
140
151
-f Dockerfile --no-cache .
141
152
142
153
if [ x" ${PUSH_IMAGE} " == x" true" ]; then
0 commit comments