-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildDocker.sh
23 lines (23 loc) · 1.29 KB
/
buildDocker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
TAG=`git describe --tags --abbrev=0`
if [ "$1" = "push" ]; then
echo "Building version:" $TAG
read -p "Are you sure you want to push these images? (y/n) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
docker build --pull --push --file multi.Dockerfile --tag micahparks/magiclinksdevmulti .
docker build --pull --push --file nop.Dockerfile --tag micahparks/magiclinksdevnop .
docker build --pull --push --file ses.Dockerfile --tag micahparks/magiclinksdevses .
docker build --pull --push --file sendgrid.Dockerfile --tag micahparks/magiclinksdevsendgrid .
docker build --pull --push --file multi.Dockerfile --tag "micahparks/magiclinksdevmulti:$TAG" .
docker build --pull --push --file nop.Dockerfile --tag "micahparks/magiclinksdevnop:$TAG" .
docker build --pull --push --file ses.Dockerfile --tag "micahparks/magiclinksdevses:$TAG" .
docker build --pull --push --file sendgrid.Dockerfile --tag "micahparks/magiclinksdevsendgrid:$TAG" .
else
docker build --pull --file multi.Dockerfile --tag micahparks/magiclinksdevmulti .
docker build --pull --file nop.Dockerfile --tag micahparks/magiclinksdevnop .
docker build --pull --file ses.Dockerfile --tag micahparks/magiclinksdevses .
docker build --pull --file sendgrid.Dockerfile --tag micahparks/magiclinksdevsendgrid .
fi