-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-all
More file actions
executable file
·36 lines (31 loc) · 677 Bytes
/
Copy pathbuild-all
File metadata and controls
executable file
·36 lines (31 loc) · 677 Bytes
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
#!/bin/bash
while [ -n "$1" ]; do
case "$1" in
-c|--clean)
CLEAN=true
;;
-p|--push)
PUSH=true
;;
*)
echo "Usage: $0 [-c|--clean] [-p|--push]" >&2
exit 1
;;
esac
shift
done
if [ "$CLEAN" = true ]; then
docker rmi php:7-fpm php:7-apache gulinux/grav-docker:apache2 gulinux/grav-docker:fpm
fi
(
cd grav-apache2/
docker build -t gulinux/grav-docker:apache2 .
)
(
cd grav-fpm/
docker build -t gulinux/grav-docker:fpm .
)
if [ "$PUSH" = true ]; then
docker push gulinux/grav-docker:apache2
docker push gulinux/grav-docker:fpm
fi