-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·38 lines (27 loc) · 936 Bytes
/
build.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
#!/bin/bash -e
BASE=$(dirname $0)
function build-and-tag() {
WKD=$1
CNT=$2
VER=$3
OLD=`pwd`
cd $WKD
echo "----------------------------------------------"
echo "Building $CNT $VER"
echo "----------------------------------------------"
docker build --no-cache -t samsara/$CNT .
img=$(docker images | grep samsara/$CNT | grep latest | awk '{print $3}')
docker tag -f $img samsara/$CNT:$VER
cd $OLD
}
#
# BUILDING images
#
sed -i '' 's/SJDK=\$SJDK./SJDK=\$SJDK7/g' $BASE/base/Dockerfile && \
build-and-tag $BASE/base base-image-jdk7 "u1410-j7u75"
sed -i '' 's/SJDK=\$SJDK./SJDK=\$SJDK8/g' $BASE/base/Dockerfile && \
build-and-tag $BASE/base base-image-jdk8 "u1410-j8u40"
build-and-tag $BASE/zookeeper zookeeper "3.4.6"
build-and-tag $BASE/kafka kafka "0.8.2.1"
build-and-tag $BASE/els elasticsearch "1.6.2"
build-and-tag $BASE/kibana kibana "4.0.2"