Skip to content
Permalink
Newer
Older
100755 44 lines (42 sloc) 1.23 KB
Sep 27, 2018
1
#!/bin/bash
2
3
cd "$(dirname "$0")"
4
source common.bash
5
Sep 28, 2018
6
SKIP_DOWNLOAD=0
7
while getopts "nhr?" opt; do
Sep 28, 2018
8
case $opt in
9
n)
10
SKIP_DOWNLOAD=1
11
;;
12
r)
13
result=$(docker ps -a | grep $maintainer/$imagename:$tag)
14
if [ ! -z "$result" ]; then
15
echo "Cleaning up $maintainer/$imagename:$tag..."
16
docker rm -f $(docker ps -a | grep $maintainer/$imagename:$tag | awk '{print $1}')
17
docker rmi -f $maintainer/$imagename:$tag
18
echo "Done"
19
fi
20
;;
21
h | ?)
22
echo "Options: -n skip download"
23
exit 0
24
;;
25
*)
26
echo "Unknown option: $opt"
27
exit 1
28
;;
Sep 28, 2018
29
esac
30
done
31
if [ "$SKIP_DOWNLOAD" = "0" ]; then ./download-midpoint || exit 1; fi
32
docker build --tag $maintainer/$imagename:$tag --build-arg maintainer=$maintainer --build-arg imagename=$imagename . || exit 1
Sep 27, 2018
33
echo "---------------------------------------------------------------------------------------"
34
echo "The midPoint containers were successfully built. To start them, execute the following:"
35
echo ""
36
echo "(for simple demo)"
37
echo ""
Oct 1, 2018
38
echo "$ cd" $(pwd)/demo/simple
39
echo "$ docker-compose up"
Sep 27, 2018
40
echo ""
41
echo "(for complex demo)"
42
echo ""
Oct 1, 2018
43
echo "$ cd" $(pwd)/demo/complex
Sep 27, 2018
44
echo "$ docker-compose up --build"
You can’t perform that action at this time.