This repository has been archived by the owner on Apr 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·75 lines (70 loc) · 2.55 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
set -e
SKIP_BUILD=0
DEPLOY=0
while getopts "sph" opt; do
case $opt in
h)
echo "Usage:"
echo " -h Display this help message."
echo " -p Pushes the containers"
echo " -s Skip the build"
exit 0
;;
p)
DEPLOY=1
;;
s)
SKIP_BUILD=1
;;
\?)
echo "Invalid Option: -$OPTARG" 1>&2
exit 1
;;
esac
done
shift $((OPTIND - 1))
if ((!SKIP_BUILD)); then
docker build . -f Dockerfile72 -t wbgrs/php:7.2
docker build . -f Dockerfile74 -t wbgrs/php:7.4
docker build . -f Dockerfile72-node -t wbgrs/php:7.2-node
docker build . -f Dockerfile74-node -t wbgrs/php:7.4-node
docker build . -f Dockerfile72-phpqa -t wbgrs/php:7.2-phpqa
docker build . -f Dockerfile74-phpqa -t wbgrs/php:7.4-phpqa
docker build . -f Dockerfile72-node-fpm -t wbgrs/php:7.2-node-fpm
docker build . -f Dockerfile74-node-fpm -t wbgrs/php:7.4-node-fpm
docker build . -f Dockerfile72-node-apache -t wbgrs/php:7.2-node-apache
docker build . -f Dockerfile74-node-apache -t wbgrs/php:7.4-node-apache
docker build . -f Dockerfile72-python -t wbgrs/php:7.2-python
docker build . -f Dockerfile74-python -t wbgrs/php:7.4-python
docker build . -f Dockerfile72-eb -t wbgrs/php:7.2-eb
docker build . -f Dockerfile74-eb -t wbgrs/php:7.4-eb
docker build . -f Dockerfile74-node12 -t wbgrs/php:7.4-node12
docker build . -f Dockerfile74-node12-fpm -t wbgrs/php:7.4-node12-fpm
docker build . -f Dockerfile74-node12-phpqa -t wbgrs/php:7.4-node12-phpqa
docker build . -f Dockerfile74-node14 -t wbgrs/php:7.4-node14
docker build . -f Dockerfile74-node14-fpm -t wbgrs/php:7.4-node14-fpm
docker build . -f Dockerfile74-node14-phpqa -t wbgrs/php:7.4-node14-phpqa
fi
if ((DEPLOY)); then
docker push wbgrs/php:7.2
docker push wbgrs/php:7.4
docker push wbgrs/php:7.2-node
docker push wbgrs/php:7.4-node
docker push wbgrs/php:7.2-phpqa
docker push wbgrs/php:7.4-phpqa
docker push wbgrs/php:7.2-node-fpm
docker push wbgrs/php:7.4-node-fpm
docker push wbgrs/php:7.2-node-apache
docker push wbgrs/php:7.4-node-apache
docker push wbgrs/php:7.2-python
docker push wbgrs/php:7.4-python
docker push wbgrs/php:7.2-eb
docker push wbgrs/php:7.4-eb
docker push wbgrs/php:7.4-node12
docker push wbgrs/php:7.4-node12-fpm
docker push wbgrs/php:7.4-node12-phpqa
docker push wbgrs/php:7.4-node14
docker push wbgrs/php:7.4-node14-fpm
docker push wbgrs/php:7.4-node14-phpqa
fi