-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-image.sh
executable file
·37 lines (33 loc) · 936 Bytes
/
build-image.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
#!/bin/bash
if [ $# -eq 0 ]; then
echo "must include major version ";
exit 1;
fi
if [ "$1" == "7.3" ]; then
VERSION="7.3.33";
MAJORVERSION="7.3"
FLAVOR="${FLAVOR:-nginx-fpm}"
fi
if [ "$1" == "7.4" ]; then
VERSION="7.4.29";
MAJORVERSION="7.4"
FLAVOR="${FLAVOR:-nginx-fpm}"
fi
if [ "$1" == "8.0" ]; then
VERSION="8.0.30";
MAJORVERSION="8.0"
FLAVOR="${FLAVOR:-nginx-fpm}"
fi
if [ "$1" == "8.1" ]; then
VERSION="8.1.30";
MAJORVERSION="8.1"
FLAVOR="${FLAVOR:-nginx-fpm}"
fi
if [ "$1" == "8.2" ]; then
VERSION="8.2.25";
MAJORVERSION="8.2"
FLAVOR="${FLAVOR:-nginx-fpm}"
fi
docker build -t markkimsal/php-platform:$VERSION-$FLAVOR -f $MAJORVERSION/$FLAVOR/Dockerfile .
echo "tagging markkimsal/php-platform:$VERSION-$FLAVOR as markkimsal/php-platform:$MAJORVERSION-$FLAVOR"
docker tag markkimsal/php-platform:$VERSION-$FLAVOR markkimsal/php-platform:$MAJORVERSION-$FLAVOR