-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_images.sh
executable file
·69 lines (59 loc) · 1.59 KB
/
build_images.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
#!/bin/bash
HADOOP_VERSION=3.2.1
HIVE_VERSION=3.1.2
SPARK_VERSION=3.1.2
AIRFLOW_VERSION=2.1.2
IMAGES_PREFIX="open-dataplatform"
function build_hadoop {
HADOOP_PATH="$PWD/hadoop/docker/base/"
docker build -f $HADOOP_PATH/Dockerfile \
-t "$IMAGES_PREFIX-hadoop-base" \
--build-arg HADOOP_VERSION=${HADOOP_VERSION} \
$HADOOP_PATH
}
function build_hdfs {
HDFS_PATH="$PWD/hadoop/docker/hdfs/"
docker build -f $HDFS_PATH/Dockerfile \
-t "$IMAGES_PREFIX-hadoop-hdfs" \
$HDFS_PATH
}
function build_hive {
HIVE_PATH="$PWD/hadoop/docker/hive/"
docker build -f $HIVE_PATH/Dockerfile \
-t "$IMAGES_PREFIX-hive" \
--build-arg HIVE_VERSION=$HIVE_VERSION \
$HIVE_PATH
}
function build_spark {
SPARK_PATH="$PWD/spark/"
docker build -f $SPARK_PATH/Dockerfile \
-t "$IMAGES_PREFIX-spark" \
--build-arg SPARK_VERSION=$SPARK_VERSION \
$SPARK_PATH
}
function build_airflow {
AIRFLOW_PATH="$PWD/airflow/"
docker build -f $AIRFLOW_PATH/Dockerfile \
-t "$IMAGES_PREFIX-airflow" \
--build-arg AIRFLOW_VERSION=$AIRFLOW_VERSION \
$AIRFLOW_PATH
}
function build_kafka_connect {
KAFKA_PATH="$PWD/kafka/"
docker build -f $KAFKA_PATH/connect.Dockerfile \
-t "$IMAGES_PREFIX-kafka-connect" \
$KAFKA_PATH
}
function build_ingestion_api {
API_PATH="$PWD/ingestion/"
docker build -f $API_PATH/Dockerfile \
-t "$IMAGES_PREFIX-ingestion-api" \
$API_PATH
}
build_hadoop
build_hdfs
build_hive
build_spark
build_airflow
build_kafka_connect
build_ingestion_api