-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.sh
executable file
·36 lines (28 loc) · 1.21 KB
/
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
#!/bin/bash -x
# Reference:
# - https://docs.docker.com/engine/userguide/containers/dockerimages/
# - https://github.com/dockerfile/java/blob/master/oracle-java8/Dockerfile
imageTag=openkbs/docker-spark-bde2020-zeppelin
#version=2.1.0-hadoop2.8-hive-java8
ZEPPELIN_DOWNLOAD_URL=http://apache.cs.utah.edu/zeppelin
#ZEPPELIN_DOWNLOAD_URL=http://www-us.apache.org/dist/zeppelin
#ZEPPELIN_VERSION=0.8.1
#ZEPPELIN_PORT=8080
ZEPPELIN_INSTALL_DIR=/usr/lib
#docker build -t ${imageTag}:${version} \
docker build --rm -t ${imageTag} . \
# --build-arg ZEPPELIN_VERSION=${ZEPPELIN_VERSION} \
# --build-arg ZEPPELIN_DOWNLOAD_URL=${ZEPPELIN_DOWNLOAD_URL} \
# --build-arg ZEPPELIN_PORT=${ZEPPELIN_PORT} \
# --build-arg ZEPPELIN_INSTALL_DIR=${ZEPPELIN_INSTALL_DIR} \
# .
echo "----> To run in interactive mode: "
echo " docker run --name <some-name> -it ${imageTag}:${version} /bin/bash"
echo "e.g."
echo " docker run it ${imageTag}:${version} "
echo " docker run --name "my-$(basename $imageTag)_${version}" -it ${imageTag}:${version} "
echo "----> Docker Images"
echo "To build again: (there is a dot at the end of the command!)"
echo " docker build -t ${imageTag}:$version -t ${imageTag}:latest . "
echo
docker images |grep "$imageTag"