File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM php:8.1 -%%VARIANT%%
1+ FROM php:%%PHP_VERSION%% -%%VARIANT%%
22
33# docker-entrypoint.sh dependencies
44RUN apk add --no-cache \
Original file line number Diff line number Diff line change 1- FROM php:8.1 -%%VARIANT%%
1+ FROM php:%%PHP_VERSION%% -%%VARIANT%%
22
33# Install dependencies
44RUN set -ex; \
Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ command -v jq >/dev/null 2>&1 || { echo >&2 "'jq' is required but not found. Abo
77[ -n " ${BASH_VERSINFO} " ] && [ -n " ${BASH_VERSINFO[0]} " ] && [ ${BASH_VERSINFO[0]} -ge 4 ] \
88 || { echo >&2 " Bash 4.0 or greater is required. Aborting." ; exit 1; }
99
10+ declare -A php_version=(
11+ [default]=' 8.1'
12+ )
13+
1014declare -A cmd=(
1115 [apache]=' apache2-foreground'
1216 [fpm]=' php-fpm'
@@ -33,6 +37,7 @@ function create_variant() {
3337 local branch=" $( sed -ne ' s/^\([0-9]*\.[0-9]*\)\..*$/\1/p' <<< " $version" ) "
3438 local url=" $( download_url " $version " ) "
3539 local ascUrl=" $( download_url " $version " ) .asc"
40+ local phpVersion=" ${php_version[$version]-${php_version[default]} } "
3641
3742 echo " updating $version [$branch ] $variant "
3843
@@ -45,6 +50,7 @@ function create_variant() {
4550 s/%%SHA256%%/' " $sha256 " ' /;
4651 s/%%DOWNLOAD_URL%%/' " $( sed -e ' s/[\/&]/\\&/g' <<< " $url" ) " ' /;
4752 s/%%DOWNLOAD_URL_ASC%%/' " $( sed -e ' s/[\/&]/\\&/g' <<< " $ascUrl" ) " ' /;
53+ s/%%PHP_VERSION%%/' " $phpVersion " ' /g;
4854 s/%%GPG_KEY%%/' " $gpg_key " ' /g;
4955 s/%%VARIANT%%/' " $variant " ' /;
5056 s/%%CMD%%/' " ${cmd[$variant]} " ' /;
You can’t perform that action at this time.
0 commit comments