diff --git a/.test/config.sh b/.test/config.sh new file mode 100755 index 0000000000..f220272073 --- /dev/null +++ b/.test/config.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# https://github.com/docker-library/official-images/blob/7629e0d0a836d0ec718a6e053753479227cf6825/test/config.sh + +imageTests[wordpress:apache]+=' + wordpress-ensure-installed +' +imageTests[wordpress:fpm]+=' + wordpress-ensure-installed +' diff --git a/.test/tests/wordpress-ensure-installed/run.sh b/.test/tests/wordpress-ensure-installed/run.sh new file mode 100755 index 0000000000..cf583331cf --- /dev/null +++ b/.test/tests/wordpress-ensure-installed/run.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +docker run --rm "$1" sh -euc ' + [ ! -s wp-includes/version.php ] || exit 1 + docker-ensure-installed.sh + [ -s wp-includes/version.php ] || exit 1 +' diff --git a/beta/php8.1/apache/docker-entrypoint.sh b/beta/php8.1/apache/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.1/apache/docker-entrypoint.sh +++ b/beta/php8.1/apache/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.1/fpm-alpine/docker-entrypoint.sh b/beta/php8.1/fpm-alpine/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.1/fpm-alpine/docker-entrypoint.sh +++ b/beta/php8.1/fpm-alpine/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.1/fpm/docker-entrypoint.sh b/beta/php8.1/fpm/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.1/fpm/docker-entrypoint.sh +++ b/beta/php8.1/fpm/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.2/apache/docker-entrypoint.sh b/beta/php8.2/apache/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.2/apache/docker-entrypoint.sh +++ b/beta/php8.2/apache/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.2/fpm-alpine/docker-entrypoint.sh b/beta/php8.2/fpm-alpine/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.2/fpm-alpine/docker-entrypoint.sh +++ b/beta/php8.2/fpm-alpine/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.2/fpm/docker-entrypoint.sh b/beta/php8.2/fpm/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.2/fpm/docker-entrypoint.sh +++ b/beta/php8.2/fpm/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.3/apache/docker-entrypoint.sh b/beta/php8.3/apache/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.3/apache/docker-entrypoint.sh +++ b/beta/php8.3/apache/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.3/fpm-alpine/docker-entrypoint.sh b/beta/php8.3/fpm-alpine/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.3/fpm-alpine/docker-entrypoint.sh +++ b/beta/php8.3/fpm-alpine/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.3/fpm/docker-entrypoint.sh b/beta/php8.3/fpm/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.3/fpm/docker-entrypoint.sh +++ b/beta/php8.3/fpm/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.4/apache/docker-entrypoint.sh b/beta/php8.4/apache/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.4/apache/docker-entrypoint.sh +++ b/beta/php8.4/apache/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.4/fpm-alpine/docker-entrypoint.sh b/beta/php8.4/fpm-alpine/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.4/fpm-alpine/docker-entrypoint.sh +++ b/beta/php8.4/fpm-alpine/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/beta/php8.4/fpm/docker-entrypoint.sh b/beta/php8.4/fpm/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/beta/php8.4/fpm/docker-entrypoint.sh +++ b/beta/php8.4/fpm/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.1/apache/docker-entrypoint.sh b/latest/php8.1/apache/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.1/apache/docker-entrypoint.sh +++ b/latest/php8.1/apache/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.1/fpm-alpine/docker-entrypoint.sh b/latest/php8.1/fpm-alpine/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.1/fpm-alpine/docker-entrypoint.sh +++ b/latest/php8.1/fpm-alpine/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.1/fpm/docker-entrypoint.sh b/latest/php8.1/fpm/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.1/fpm/docker-entrypoint.sh +++ b/latest/php8.1/fpm/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.2/apache/docker-entrypoint.sh b/latest/php8.2/apache/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.2/apache/docker-entrypoint.sh +++ b/latest/php8.2/apache/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.2/fpm-alpine/docker-entrypoint.sh b/latest/php8.2/fpm-alpine/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.2/fpm-alpine/docker-entrypoint.sh +++ b/latest/php8.2/fpm-alpine/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.2/fpm/docker-entrypoint.sh b/latest/php8.2/fpm/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.2/fpm/docker-entrypoint.sh +++ b/latest/php8.2/fpm/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.3/apache/docker-entrypoint.sh b/latest/php8.3/apache/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.3/apache/docker-entrypoint.sh +++ b/latest/php8.3/apache/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.3/fpm-alpine/docker-entrypoint.sh b/latest/php8.3/fpm-alpine/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.3/fpm-alpine/docker-entrypoint.sh +++ b/latest/php8.3/fpm-alpine/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.3/fpm/docker-entrypoint.sh b/latest/php8.3/fpm/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.3/fpm/docker-entrypoint.sh +++ b/latest/php8.3/fpm/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.4/apache/docker-entrypoint.sh b/latest/php8.4/apache/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.4/apache/docker-entrypoint.sh +++ b/latest/php8.4/apache/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.4/fpm-alpine/docker-entrypoint.sh b/latest/php8.4/fpm-alpine/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.4/fpm-alpine/docker-entrypoint.sh +++ b/latest/php8.4/fpm-alpine/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}" diff --git a/latest/php8.4/fpm/docker-entrypoint.sh b/latest/php8.4/fpm/docker-entrypoint.sh index 95d3a6d977..dad730375c 100755 --- a/latest/php8.4/fpm/docker-entrypoint.sh +++ b/latest/php8.4/fpm/docker-entrypoint.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash set -Eeuo pipefail -if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then +if [[ "${1-}" == apache2* ]] || [ "${1-}" = 'php-fpm' ] || { self="$(basename "$0")" && [ "$self" = 'docker-ensure-installed.sh' ]; }; then uid="$(id -u)" gid="$(id -g)" if [ "$uid" = '0' ]; then - case "$1" in + case "${1-}" in apache2*) user="${APACHE_RUN_USER:-www-data}" group="${APACHE_RUN_GROUP:-www-data}"