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