forked from NetEase/kyuubi-arctic-playground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-image.sh
executable file
·117 lines (103 loc) · 4.61 KB
/
build-image.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/usr/bin/env bash
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -e
APACHE_MIRROR=${APACHE_MIRROR:-https://mirrors.cloud.tencent.com/apache}
MAVEN_MIRROR=${MAVEN_MIRROR:-https://mirrors.cloud.tencent.com/maven}
BUILD_CMD="docker build"
if [ $BUILDX ]; then
echo "Using buildx to build cross-platform images"
BUILD_CMD="docker buildx build --platform=linux/amd64,linux/arm64 --push"
fi
SELF_DIR="$(cd "$(dirname "$0")"; pwd)"
source "${SELF_DIR}/.env"
${BUILD_CMD} \
--build-arg PLAYGROUND_VERSION=${PLAYGROUND_VERSION} \
--build-arg APACHE_MIRROR=${APACHE_MIRROR} \
--build-arg MAVEN_MIRROR=${MAVEN_MIRROR} \
--file "${SELF_DIR}/docker/playground-base.Dockerfile" \
--tag nekyuubi/playground-base:${PLAYGROUND_VERSION} \
"${SELF_DIR}/docker" $@
${BUILD_CMD} \
--build-arg PLAYGROUND_VERSION=${PLAYGROUND_VERSION} \
--build-arg APACHE_MIRROR=${APACHE_MIRROR} \
--build-arg MAVEN_MIRROR=${MAVEN_MIRROR} \
--file "${SELF_DIR}/docker/playground-base-java17.Dockerfile" \
--tag nekyuubi/playground-base-java17:${PLAYGROUND_VERSION} \
"${SELF_DIR}/docker" $@
${BUILD_CMD} \
--build-arg PLAYGROUND_VERSION=${PLAYGROUND_VERSION} \
--build-arg APACHE_MIRROR=${APACHE_MIRROR} \
--build-arg MAVEN_MIRROR=${MAVEN_MIRROR} \
--build-arg KYUUBI_VERSION=${KYUUBI_VERSION} \
--build-arg AWS_JAVA_SDK_VERSION=${AWS_JAVA_SDK_VERSION} \
--build-arg HADOOP_VERSION=${HADOOP_VERSION} \
--file "${SELF_DIR}/docker/playground-hadoop.Dockerfile" \
--tag nekyuubi/playground-hadoop:${PLAYGROUND_VERSION} \
"${SELF_DIR}/docker" $@
${BUILD_CMD} \
--build-arg PLAYGROUND_VERSION=${PLAYGROUND_VERSION} \
--build-arg APACHE_MIRROR=${APACHE_MIRROR} \
--build-arg MAVEN_MIRROR=${MAVEN_MIRROR} \
--build-arg KYUUBI_VERSION=${KYUUBI_VERSION} \
--build-arg HIVE_VERSION=${HIVE_VERSION} \
--build-arg MYSQL_VERSION=${MYSQL_VERSION} \
--file "${SELF_DIR}/docker/playground-metastore.Dockerfile" \
--tag nekyuubi/playground-metastore:${PLAYGROUND_VERSION} \
"${SELF_DIR}/docker" $@
${BUILD_CMD} \
--build-arg PLAYGROUND_VERSION=${PLAYGROUND_VERSION} \
--build-arg APACHE_MIRROR=${APACHE_MIRROR} \
--build-arg MAVEN_MIRROR=${MAVEN_MIRROR} \
--build-arg KYUUBI_VERSION=${KYUUBI_VERSION} \
--build-arg AWS_JAVA_SDK_VERSION=${AWS_JAVA_SDK_VERSION} \
--build-arg CLICKHOUSE_JDBC_VERSION=${CLICKHOUSE_JDBC_VERSION} \
--build-arg SPARK_HADOOP_VERSION=${SPARK_HADOOP_VERSION} \
--build-arg MYSQL_VERSION=${MYSQL_VERSION} \
--build-arg SCALA_BINARY_VERSION=${SCALA_BINARY_VERSION} \
--build-arg SPARK_VERSION=${SPARK_VERSION} \
--build-arg SPARK_BINARY_VERSION=${SPARK_BINARY_VERSION} \
--file "${SELF_DIR}/docker/playground-spark.Dockerfile" \
--tag nekyuubi/playground-spark:${PLAYGROUND_VERSION} \
"${SELF_DIR}/docker" $@
${BUILD_CMD} \
--build-arg PLAYGROUND_VERSION=${PLAYGROUND_VERSION} \
--build-arg APACHE_MIRROR=${APACHE_MIRROR} \
--build-arg MAVEN_MIRROR=${MAVEN_MIRROR} \
--build-arg KYUUBI_VERSION=${KYUUBI_VERSION} \
--build-arg AWS_JAVA_SDK_VERSION=${AWS_JAVA_SDK_VERSION} \
--build-arg KYUUBI_HADOOP_VERSION=${KYUUBI_HADOOP_VERSION} \
--file "${SELF_DIR}/docker/playground-kyuubi.Dockerfile" \
--tag nekyuubi/playground-kyuubi:${PLAYGROUND_VERSION} \
"${SELF_DIR}/docker" $@
${BUILD_CMD} \
--build-arg PLAYGROUND_VERSION=${PLAYGROUND_VERSION} \
--build-arg MAVEN_MIRROR=${MAVEN_MIRROR} \
--build-arg KYUUBI_VERSION=${KYUUBI_VERSION} \
--build-arg ARCTIC_VERSION=${ARCTIC_VERSION} \
--build-arg ARCTIC_HADOOP_VERSION=${ARCTIC_HADOOP_VERSION} \
--build-arg AWS_JAVA_SDK_VERSION=${AWS_JAVA_SDK_VERSION} \
--file "${SELF_DIR}/docker/playground-ams.Dockerfile" \
--tag nekyuubi/playground-ams:${PLAYGROUND_VERSION} \
"${SELF_DIR}/docker" $@
${BUILD_CMD} \
--build-arg PLAYGROUND_VERSION=${PLAYGROUND_VERSION} \
--file "${SELF_DIR}/docker/playground-mysql-datagen.Dockerfile" \
--tag nekyuubi/playground-mysql-datagen:${PLAYGROUND_VERSION} \
"${SELF_DIR}/docker" $@
${BUILD_CMD} \
--build-arg PLAYGROUND_VERSION=${PLAYGROUND_VERSION} \
--file "${SELF_DIR}/docker/playground-mysql-arctic-cdc.Dockerfile" \
--tag nekyuubi/playground-mysql-arctic-cdc:${PLAYGROUND_VERSION} \
"${SELF_DIR}/docker" $@