summaryrefslogtreecommitdiffstats
path: root/update.sh
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2018-02-11 02:58:17 +0100
committerJ0WI <J0WI@users.noreply.github.com>2018-02-22 18:07:57 +0100
commit22de97f206a74a931c6e25439bf18ada178e990b (patch)
treef094dc149ff18ebb391bb2ab3679f833ff010d71 /update.sh
parent0e76d154a167ece805fbdfe44665011d215ae275 (diff)
Add Alpine variant
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/update.sh b/update.sh
index 2fb6f4c0..dfe2170f 100755
--- a/update.sh
+++ b/update.sh
@@ -4,11 +4,19 @@ set -eo pipefail
declare -A cmd=(
[apache]='apache2-foreground'
[fpm]='php-fpm'
+ [fpm-alpine]='php-fpm'
+)
+
+declare -A base=(
+ [apache]='debian'
+ [fpm]='debian'
+ [fpm-alpine]='alpine'
)
declare -A extras=(
[apache]='\nRUN a2enmod rewrite'
[fpm]=''
+ [fpm-alpine]=''
)
# version_greater_or_equal A B returns whether A >= B
@@ -34,11 +42,11 @@ for latest in "${latests[@]}"; do
# Only add versions >= 11
if version_greater_or_equal "$version" "11.0"; then
- for variant in apache fpm; do
+ for variant in apache fpm fpm-alpine; do
# Create the version+variant directory with a Dockerfile.
mkdir -p "$version/$variant"
- template="Dockerfile.template"
+ template="Dockerfile-${base[$variant]}.template"
cp "$template" "$version/$variant/Dockerfile"
echo "updating $latest [$version] $variant"