diff --git a/docker/php-apache-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-apache-dev/8.1/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.1/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.1/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.1/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-apache-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-apache-dev/8.2/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.2/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.2/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.2/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-apache-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-apache-dev/8.3/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.3/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.3/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.3/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-apache-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-apache-dev/8.4/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.4/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.4/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.4/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-apache-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-apache-dev/8.5/conf/provision/bootstrap.d/10-php.sh b/docker/php-apache-dev/8.5/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-apache-dev/8.5/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-apache-dev/8.5/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.1/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.1/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.1/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.1/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.2/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.2/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.2/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.2/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.3/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.3/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.3/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.3/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.4/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.4/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.4/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.4/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-dev/8.5/conf/provision/bootstrap.d/10-php.sh b/docker/php-dev/8.5/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-dev/8.5/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-dev/8.5/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.1-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.1/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.1/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.1/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.1/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.2-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.2/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.2/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.2/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.2/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.3-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.3/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.3/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.3/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.3/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.4-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.4/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.4/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.4/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.4/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.5-alpine/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-nginx-dev/8.5/conf/provision/bootstrap.d/10-php.sh b/docker/php-nginx-dev/8.5/conf/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/docker/php-nginx-dev/8.5/conf/provision/bootstrap.d/10-php.sh +++ b/docker/php-nginx-dev/8.5/conf/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/docker/php-official/8.1/Dockerfile b/docker/php-official/8.1/Dockerfile index 3c2d82437..6074944e0 100644 --- a/docker/php-official/8.1/Dockerfile +++ b/docker/php-official/8.1/Dockerfile @@ -106,6 +106,8 @@ RUN set -x \ libpng16-16 \ libmcrypt4 \ libzip4 \ + libyaml-0-2 \ + libc-client2007e \ # Dev and headers libavif-dev \ libjpeg62-turbo-dev \ @@ -130,6 +132,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ # Install guetzli && wget https://github.com/google/guetzli/archive/master.zip \ && unzip master.zip \ @@ -183,6 +186,7 @@ RUN set -x \ && pecl install protobuf-4.33.5 \ && pecl install xmlrpc-1.0.0RC3 \ && pecl install vips \ + && pecl install yaml \ && pecl install redis \ && pecl install mongodb \ && echo extension=apcu.so > /usr/local/etc/php/conf.d/apcu.ini \ @@ -193,6 +197,7 @@ RUN set -x \ && echo extension=mongodb.so > /usr/local/etc/php/conf.d/mongodb.ini \ && echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \ && echo extension=vips.so > /usr/local/etc/php/conf.d/vips.ini \ + && echo extension=yaml.so > /usr/local/etc/php/conf.d/yaml.ini \ && echo extension=xmlrpc.so > /usr/local/etc/php/conf.d/xmlrpc.ini \ # Uninstall dev and header packages && apt-get purge -y -f --force-yes \ @@ -216,6 +221,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ && rm -f /usr/local/etc/php-fpm.d/zz-docker.conf \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer2 \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer1 --1 \ diff --git a/docker/php-official/8.2/Dockerfile b/docker/php-official/8.2/Dockerfile index 60832e904..56b23a928 100644 --- a/docker/php-official/8.2/Dockerfile +++ b/docker/php-official/8.2/Dockerfile @@ -106,6 +106,7 @@ RUN set -x \ libpng16-16 \ libmcrypt4 \ libzip4 \ + libyaml-0-2 \ libc-client2007e \ # Dev and headers libavif-dev \ @@ -131,6 +132,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ libssl-dev \ # Install guetzli && wget https://github.com/google/guetzli/archive/master.zip \ @@ -186,6 +188,7 @@ RUN set -x \ && pecl install protobuf \ && pecl install xmlrpc-1.0.0RC3 \ && pecl install vips \ + && pecl install yaml \ && pecl install redis \ && pecl install mongodb \ && echo extension=apcu.so > /usr/local/etc/php/conf.d/apcu.ini \ @@ -196,6 +199,7 @@ RUN set -x \ && echo extension=mongodb.so > /usr/local/etc/php/conf.d/mongodb.ini \ && echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \ && echo extension=vips.so > /usr/local/etc/php/conf.d/vips.ini \ + && echo extension=yaml.so > /usr/local/etc/php/conf.d/yaml.ini \ && echo extension=xmlrpc.so > /usr/local/etc/php/conf.d/xmlrpc.ini \ # Uninstall dev and header packages && apt-get purge -y -f --force-yes \ @@ -219,6 +223,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ libssl-dev \ && rm -f /usr/local/etc/php-fpm.d/zz-docker.conf \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer2 \ diff --git a/docker/php-official/8.3/Dockerfile b/docker/php-official/8.3/Dockerfile index d6fedee3a..f36323278 100644 --- a/docker/php-official/8.3/Dockerfile +++ b/docker/php-official/8.3/Dockerfile @@ -106,6 +106,7 @@ RUN set -x \ libpng16-16 \ libmcrypt4 \ libzip4 \ + libyaml-0-2 \ libc-client2007e \ # Dev and headers libavif-dev \ @@ -131,6 +132,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ libssl-dev \ # Install guetzli && wget https://github.com/google/guetzli/archive/master.zip \ @@ -186,6 +188,7 @@ RUN set -x \ && pecl install protobuf \ && pecl install xmlrpc-1.0.0RC3 \ && pecl install vips \ + && pecl install yaml \ && pecl install redis \ && pecl install mongodb \ && echo extension=apcu.so > /usr/local/etc/php/conf.d/apcu.ini \ @@ -196,6 +199,7 @@ RUN set -x \ && echo extension=mongodb.so > /usr/local/etc/php/conf.d/mongodb.ini \ && echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \ && echo extension=vips.so > /usr/local/etc/php/conf.d/vips.ini \ + && echo extension=yaml.so > /usr/local/etc/php/conf.d/yaml.ini \ && echo extension=xmlrpc.so > /usr/local/etc/php/conf.d/xmlrpc.ini \ # Uninstall dev and header packages && apt-get purge -y -f --force-yes \ @@ -219,6 +223,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ libssl-dev \ && rm -f /usr/local/etc/php-fpm.d/zz-docker.conf \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer2 \ diff --git a/docker/php-official/8.4/Dockerfile b/docker/php-official/8.4/Dockerfile index 421233301..95a78d9ca 100644 --- a/docker/php-official/8.4/Dockerfile +++ b/docker/php-official/8.4/Dockerfile @@ -106,6 +106,7 @@ RUN set -x \ libpng16-16 \ libmcrypt4 \ libzip4 \ + libyaml-0-2 \ # Dev and headers libavif-dev \ libjpeg62-turbo-dev \ @@ -130,6 +131,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ libssl-dev \ # Install guetzli && wget https://github.com/google/guetzli/archive/master.zip \ @@ -183,6 +185,7 @@ RUN set -x \ && pecl install protobuf \ && pecl install xmlrpc-1.0.0RC3 \ && pecl install vips \ + && pecl install yaml \ && pecl install redis \ && pecl install mongodb \ && echo extension=apcu.so > /usr/local/etc/php/conf.d/apcu.ini \ @@ -193,6 +196,7 @@ RUN set -x \ && echo extension=mongodb.so > /usr/local/etc/php/conf.d/mongodb.ini \ && echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \ && echo extension=vips.so > /usr/local/etc/php/conf.d/vips.ini \ + && echo extension=yaml.so > /usr/local/etc/php/conf.d/yaml.ini \ && echo extension=xmlrpc.so > /usr/local/etc/php/conf.d/xmlrpc.ini \ # Uninstall dev and header packages && apt-get purge -y -f --force-yes \ @@ -216,6 +220,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ libssl-dev \ && rm -f /usr/local/etc/php-fpm.d/zz-docker.conf \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer2 \ diff --git a/docker/php-official/8.5/Dockerfile b/docker/php-official/8.5/Dockerfile index 095371531..2bf88ab40 100644 --- a/docker/php-official/8.5/Dockerfile +++ b/docker/php-official/8.5/Dockerfile @@ -106,6 +106,7 @@ RUN set -x \ libpng16-16 \ libmcrypt4 \ libzip4 \ + libyaml-0-2 \ # Dev and headers libavif-dev \ libjpeg62-turbo-dev \ @@ -130,6 +131,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ libssl-dev \ # Install guetzli && wget https://github.com/google/guetzli/archive/master.zip \ @@ -182,6 +184,7 @@ RUN set -x \ && pecl install protobuf \ && pecl install xmlrpc-1.0.0RC3 \ && pecl install vips \ + && pecl install yaml \ && pecl install redis \ && pecl install mongodb \ && echo extension=apcu.so > /usr/local/etc/php/conf.d/apcu.ini \ @@ -192,6 +195,7 @@ RUN set -x \ && echo extension=mongodb.so > /usr/local/etc/php/conf.d/mongodb.ini \ && echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \ && echo extension=vips.so > /usr/local/etc/php/conf.d/vips.ini \ + && echo extension=yaml.so > /usr/local/etc/php/conf.d/yaml.ini \ && echo extension=xmlrpc.so > /usr/local/etc/php/conf.d/xmlrpc.ini \ # Uninstall dev and header packages && apt-get purge -y -f --force-yes \ @@ -215,6 +219,7 @@ RUN set -x \ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ libssl-dev \ && rm -f /usr/local/etc/php-fpm.d/zz-docker.conf \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer2 \ diff --git a/provisioning/php-dev/general/provision/bootstrap.d/10-php.sh b/provisioning/php-dev/general/provision/bootstrap.d/10-php.sh index 852567f85..59b4f08b8 100644 --- a/provisioning/php-dev/general/provision/bootstrap.d/10-php.sh +++ b/provisioning/php-dev/general/provision/bootstrap.d/10-php.sh @@ -18,7 +18,7 @@ else # listen on public IPv6 port go-replace --mode=line --regex \ -s '^[\s;]*listen[\s]*=' -r 'listen = [::]:9000' \ - -- /opt/docker/etc/php/fpm/pool.d/application.conf \ - /opt/docker/etc/php/fpm/php-fpm.conf + --path=/opt/docker/etc/php/fpm/ \ + --path-pattern='*.conf' fi diff --git a/template/Dockerfile/images/php.jinja2 b/template/Dockerfile/images/php.jinja2 index f9a1af398..7a27302cc 100644 --- a/template/Dockerfile/images/php.jinja2 +++ b/template/Dockerfile/images/php.jinja2 @@ -33,7 +33,8 @@ libpng16-16 \ libmcrypt4 \ libzip4 \ -{%- if version == '8.2' or version == '8.3' %} + libyaml-0-2 \ +{%- if version == '8.1' or version == '8.2' or version == '8.3' %} libc-client2007e \ {%- endif %} # Dev and headers @@ -60,6 +61,7 @@ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ {%- if version == '8.2' or version == '8.3' or version == '8.4' or version == '8.5' %} libssl-dev \ {%- endif %} @@ -131,6 +133,7 @@ {%- endif %} && pecl install xmlrpc-1.0.0RC3 \ && pecl install vips \ + && pecl install yaml \ && pecl install redis \ && pecl install mongodb \ && echo extension=apcu.so > /usr/local/etc/php/conf.d/apcu.ini \ @@ -141,6 +144,7 @@ && echo extension=mongodb.so > /usr/local/etc/php/conf.d/mongodb.ini \ && echo extension=memcached.so > /usr/local/etc/php/conf.d/memcached.ini \ && echo extension=vips.so > /usr/local/etc/php/conf.d/vips.ini \ + && echo extension=yaml.so > /usr/local/etc/php/conf.d/yaml.ini \ && echo extension=xmlrpc.so > /usr/local/etc/php/conf.d/xmlrpc.ini \ # Uninstall dev and header packages && apt-get purge -y -f --force-yes \ @@ -164,6 +168,7 @@ librabbitmq-dev \ libmagick++-dev \ libgmp-dev \ + libyaml-dev \ {%- if version == '8.2' or version == '8.3' or version == '8.4' or version == '8.5' %} libssl-dev \ {%- endif %} diff --git a/tests/serverspec/spec/collection/php-fpm7.rb b/tests/serverspec/spec/collection/php-fpm.rb similarity index 64% rename from tests/serverspec/spec/collection/php-fpm7.rb rename to tests/serverspec/spec/collection/php-fpm.rb index 6aeaae095..45cd91a68 100644 --- a/tests/serverspec/spec/collection/php-fpm7.rb +++ b/tests/serverspec/spec/collection/php-fpm.rb @@ -1,9 +1,9 @@ -shared_examples 'collection::php-fpm7' do +shared_examples 'collection::php-fpm' do include_examples 'php-fpm::layout' - include_examples 'php-fpm7::layout' + include_examples 'php-fpm::versioned::layout' end -shared_examples 'collection::php-fpm7::public' do +shared_examples 'collection::php-fpm::public' do # services include_examples 'php-fpm::listening::public' @@ -12,7 +12,7 @@ end -shared_examples 'collection::php-fpm7::local-only' do +shared_examples 'collection::php-fpm::local-only' do # services include_examples 'php-fpm::listening::local-only' @@ -21,26 +21,25 @@ end -shared_examples 'collection::php-fpm7::webserver-test::development' do +shared_examples 'collection::php-fpm::webserver-test::development' do include_examples 'php-fpm::modules' - include_examples 'php-fpm7::modules' + include_examples 'php-fpm::versioned::modules' include_examples 'php-fpm::modules::development' include_examples 'php::fpm::test::sha1' include_examples 'php::fpm::test::php_ini_scanned_files' include_examples 'php::fpm::test::php_sapi_name' include_examples 'php::fpm::test::process_user_id' - include_examples 'php7::fpm::test::version' + include_examples 'php::fpm::test::version' end -shared_examples 'collection::php-fpm7::webserver-test::production' do +shared_examples 'collection::php-fpm::webserver-test::production' do include_examples 'php-fpm::modules' - include_examples 'php-fpm7::modules' + include_examples 'php-fpm::versioned::modules' include_examples 'php-fpm::modules::production' include_examples 'php::fpm::test::sha1' include_examples 'php::fpm::test::php_ini_scanned_files' include_examples 'php::fpm::test::php_sapi_name' include_examples 'php::fpm::test::process_user_id' - include_examples 'php7::fpm::test::version' + include_examples 'php::fpm::test::version' end - diff --git a/tests/serverspec/spec/collection/php7.rb b/tests/serverspec/spec/collection/php.rb similarity index 60% rename from tests/serverspec/spec/collection/php7.rb rename to tests/serverspec/spec/collection/php.rb index 614d4481f..92c0ac05e 100644 --- a/tests/serverspec/spec/collection/php7.rb +++ b/tests/serverspec/spec/collection/php.rb @@ -1,11 +1,14 @@ -shared_examples 'collection::php7' do +shared_examples 'collection::php' do include_examples 'php::layout' include_examples 'php::cli' - include_examples 'php7::cli::version' + include_examples 'php::cli::version' + include_examples 'php::modules::ftp_ssl' include_examples 'php::modules' - include_examples 'php7::modules' + include_examples 'php::modules::versioned' include_examples 'php::cli::configuration' include_examples 'php::cli::test::sha1' + include_examples 'php::cli::test::avif' + include_examples 'php::cli::test::imap' if $testConfiguration[:phpImap] include_examples 'php::cli::test::php_ini_scanned_files' include_examples 'php::cli::test::php_sapi_name' include_examples 'php::composer' @@ -15,14 +18,14 @@ include_examples 'misc::ghostscript' end -shared_examples 'collection::php7::production' do - include_examples 'collection::php7' +shared_examples 'collection::php::production' do + include_examples 'collection::php' include_examples 'php::modules::production' include_examples 'php::cli::configuration::production' end -shared_examples 'collection::php7::development' do - include_examples 'collection::php7' +shared_examples 'collection::php::development' do + include_examples 'collection::php' include_examples 'php::modules::development' include_examples 'php::cli::configuration::development' end diff --git a/tests/serverspec/spec/docker/php-apache-dev_spec.rb b/tests/serverspec/spec/docker/php-apache-dev_spec.rb index 110711994..f1c4edb91 100644 --- a/tests/serverspec/spec/docker/php-apache-dev_spec.rb +++ b/tests/serverspec/spec/docker/php-apache-dev_spec.rb @@ -10,28 +10,13 @@ include_examples 'collection::bootstrap' include_examples 'collection::base' include_examples 'collection::base-app' - include_examples 'php::modules::ftp_ssl' if $testConfiguration[:php] == 8 - include_examples 'php::cli::test::imap' if $testConfiguration[:phpImap] - - if ($testConfiguration[:php] == 5) - include_examples 'collection::php5::development' - include_examples 'collection::php-fpm5' - include_examples 'collection::php-fpm5::public' - elsif ($testConfiguration[:php] == 8) - else - include_examples 'collection::php7::development' - include_examples 'collection::php-fpm7' - include_examples 'collection::php-fpm7::public' - end + include_examples 'collection::php::development' + include_examples 'collection::php-fpm' + include_examples 'collection::php-fpm::public' include_examples 'collection::php-tools' include_examples 'collection::apache' - if ($testConfiguration[:php] == 5) - include_examples 'collection::php-fpm5::webserver-test::development' - elsif ($testConfiguration[:php] == 8) - else - include_examples 'collection::php-fpm7::webserver-test::development' - end + include_examples 'collection::php-fpm::webserver-test::development' end diff --git a/tests/serverspec/spec/docker/php-apache_spec.rb b/tests/serverspec/spec/docker/php-apache_spec.rb index 35f7a94c2..7603ea456 100644 --- a/tests/serverspec/spec/docker/php-apache_spec.rb +++ b/tests/serverspec/spec/docker/php-apache_spec.rb @@ -10,27 +10,12 @@ include_examples 'collection::bootstrap' include_examples 'collection::base' include_examples 'collection::base-app' - include_examples 'php::modules::ftp_ssl' if $testConfiguration[:php] == 8 - include_examples 'php::cli::test::imap' if $testConfiguration[:phpImap] - - if ($testConfiguration[:php] == 5) - include_examples 'collection::php5::production' - include_examples 'collection::php-fpm5' - include_examples 'collection::php-fpm5::local-only' - elsif ($testConfiguration[:php] == 8) - else - include_examples 'collection::php7::production' - include_examples 'collection::php-fpm7' - include_examples 'collection::php-fpm7::local-only' - end + include_examples 'collection::php::production' + include_examples 'collection::php-fpm' + include_examples 'collection::php-fpm::local-only' include_examples 'collection::apache' - if ($testConfiguration[:php] == 5) - include_examples 'collection::php-fpm5::webserver-test::production' - elsif ($testConfiguration[:php] == 8) - else - include_examples 'collection::php-fpm7::webserver-test::production' - end + include_examples 'collection::php-fpm::webserver-test::production' end diff --git a/tests/serverspec/spec/docker/php-dev_spec.rb b/tests/serverspec/spec/docker/php-dev_spec.rb index 778cb6cd5..e15eae94c 100644 --- a/tests/serverspec/spec/docker/php-dev_spec.rb +++ b/tests/serverspec/spec/docker/php-dev_spec.rb @@ -10,19 +10,9 @@ include_examples 'collection::bootstrap' include_examples 'collection::base' include_examples 'collection::base-app' - include_examples 'php::modules::ftp_ssl' if $testConfiguration[:php] == 8 - include_examples 'php::cli::test::imap' if $testConfiguration[:phpImap] - - if ($testConfiguration[:php] == 5) - include_examples 'collection::php5::development' - include_examples 'collection::php-fpm5' - include_examples 'collection::php-fpm5::public' - elsif ($testConfiguration[:php] == 8) - else - include_examples 'collection::php7::development' - include_examples 'collection::php-fpm7' - include_examples 'collection::php-fpm7::public' - end + include_examples 'collection::php::development' + include_examples 'collection::php-fpm' + include_examples 'collection::php-fpm::public' include_examples 'collection::php-tools' include_examples 'collection::development' diff --git a/tests/serverspec/spec/docker/php-nginx-dev_spec.rb b/tests/serverspec/spec/docker/php-nginx-dev_spec.rb index 96be6a408..358c85a1c 100644 --- a/tests/serverspec/spec/docker/php-nginx-dev_spec.rb +++ b/tests/serverspec/spec/docker/php-nginx-dev_spec.rb @@ -10,28 +10,13 @@ include_examples 'collection::bootstrap' include_examples 'collection::base' include_examples 'collection::base-app' - include_examples 'php::modules::ftp_ssl' if $testConfiguration[:php] == 8 - include_examples 'php::cli::test::imap' if $testConfiguration[:phpImap] - - if ($testConfiguration[:php] == 5) - include_examples 'collection::php5::development' - include_examples 'collection::php-fpm5' - include_examples 'collection::php-fpm5::public' - elsif ($testConfiguration[:php] == 8) - else - include_examples 'collection::php7::development' - include_examples 'collection::php-fpm7' - include_examples 'collection::php-fpm7::public' - end + include_examples 'collection::php::development' + include_examples 'collection::php-fpm' + include_examples 'collection::php-fpm::public' include_examples 'collection::php-tools' include_examples 'collection::nginx' - if ($testConfiguration[:php] == 5) - include_examples 'collection::php-fpm5::webserver-test::development' - elsif ($testConfiguration[:php] == 8) - else - include_examples 'collection::php-fpm7::webserver-test::development' - end + include_examples 'collection::php-fpm::webserver-test::development' end diff --git a/tests/serverspec/spec/docker/php-nginx_spec.rb b/tests/serverspec/spec/docker/php-nginx_spec.rb index 396dee84a..8e458f157 100644 --- a/tests/serverspec/spec/docker/php-nginx_spec.rb +++ b/tests/serverspec/spec/docker/php-nginx_spec.rb @@ -10,27 +10,12 @@ include_examples 'collection::bootstrap' include_examples 'collection::base' include_examples 'collection::base-app' - include_examples 'php::modules::ftp_ssl' if $testConfiguration[:php] == 8 - include_examples 'php::cli::test::imap' if $testConfiguration[:phpImap] - - if ($testConfiguration[:php] == 5) - include_examples 'collection::php5::production' - include_examples 'collection::php-fpm5' - include_examples 'collection::php-fpm5::local-only' - elsif ($testConfiguration[:php] == 8) - else - include_examples 'collection::php7::production' - include_examples 'collection::php-fpm7' - include_examples 'collection::php-fpm7::local-only' - end + include_examples 'collection::php::production' + include_examples 'collection::php-fpm' + include_examples 'collection::php-fpm::local-only' include_examples 'collection::nginx' - if ($testConfiguration[:php] == 5) - include_examples 'collection::php-fpm5::webserver-test::production' - elsif ($testConfiguration[:php] == 8) - else - include_examples 'collection::php-fpm7::webserver-test::production' - end + include_examples 'collection::php-fpm::webserver-test::production' end diff --git a/tests/serverspec/spec/docker/php-official_spec.rb b/tests/serverspec/spec/docker/php-official_spec.rb index bdd0568b4..f5bafaeaf 100644 --- a/tests/serverspec/spec/docker/php-official_spec.rb +++ b/tests/serverspec/spec/docker/php-official_spec.rb @@ -10,19 +10,8 @@ include_examples 'collection::bootstrap' include_examples 'collection::base' include_examples 'collection::base-app' - include_examples 'php::modules::ftp_ssl' if $testConfiguration[:php] == 8 - include_examples 'php::cli::test::imap' if $testConfiguration[:phpImap] - - if ($testConfiguration[:php] == 5) - include_examples 'collection::php5::production' - include_examples 'collection::php-fpm5' - include_examples 'collection::php-fpm5::public' - elsif ($testConfiguration[:php] == 8) - include_examples 'php::cli::test::avif' - else - include_examples 'collection::php7::production' - include_examples 'collection::php-fpm7' - include_examples 'collection::php-fpm7::public' - end + include_examples 'collection::php::production' + include_examples 'collection::php-fpm' + include_examples 'collection::php-fpm::public' end diff --git a/tests/serverspec/spec/docker/php_spec.rb b/tests/serverspec/spec/docker/php_spec.rb index bdd0568b4..f5bafaeaf 100644 --- a/tests/serverspec/spec/docker/php_spec.rb +++ b/tests/serverspec/spec/docker/php_spec.rb @@ -10,19 +10,8 @@ include_examples 'collection::bootstrap' include_examples 'collection::base' include_examples 'collection::base-app' - include_examples 'php::modules::ftp_ssl' if $testConfiguration[:php] == 8 - include_examples 'php::cli::test::imap' if $testConfiguration[:phpImap] - - if ($testConfiguration[:php] == 5) - include_examples 'collection::php5::production' - include_examples 'collection::php-fpm5' - include_examples 'collection::php-fpm5::public' - elsif ($testConfiguration[:php] == 8) - include_examples 'php::cli::test::avif' - else - include_examples 'collection::php7::production' - include_examples 'collection::php-fpm7' - include_examples 'collection::php-fpm7::public' - end + include_examples 'collection::php::production' + include_examples 'collection::php-fpm' + include_examples 'collection::php-fpm::public' end diff --git a/tests/serverspec/spec/shared/php/configuration.rb b/tests/serverspec/spec/shared/php/configuration.rb index 0b47cb8af..3d2e1041a 100644 --- a/tests/serverspec/spec/shared/php/configuration.rb +++ b/tests/serverspec/spec/shared/php/configuration.rb @@ -82,10 +82,6 @@ context php_config('opcache.max_accelerated_files') do its(:value) { should eq 7963 } end - - context php_config('opcache.fast_shutdown') do - its(:value) { should eq 1 } - end end end @@ -125,9 +121,5 @@ context php_config('opcache.max_accelerated_files') do its(:value) { should eq 7963 } end - - context php_config('opcache.fast_shutdown') do - its(:value) { should eq 1 } - end end end diff --git a/tests/serverspec/spec/shared/php/fpm.rb b/tests/serverspec/spec/shared/php/fpm.rb index dc961ce3a..d281b626c 100644 --- a/tests/serverspec/spec/shared/php/fpm.rb +++ b/tests/serverspec/spec/shared/php/fpm.rb @@ -10,35 +10,12 @@ end end -shared_examples 'php-fpm5::layout' do - it "should have local php-fpm 5.x layout" do +shared_examples 'php-fpm::versioned::layout' do + it "should have local php-fpm 8.x layout" do if $testConfiguration[:phpOfficialImage] expect(file("/usr/local/etc/php-fpm.d")).to be_symlink elsif os[:family] == 'redhat' expect(file("/etc/php-fpm.d")).to be_symlink - elsif ['debian', 'ubuntu'].include?(os[:family]) - expect(file("/etc/php5/fpm/pool.d")).to be_symlink - end - end -end - - -shared_examples 'php-fpm7::layout' do - it "should have local php-fpm 7.x layout" do - if $testConfiguration[:phpOfficialImage] - expect(file("/usr/local/etc/php-fpm.d")).to be_symlink - elsif os[:family] == 'redhat' - expect(file("/etc/php-fpm.d")).to be_symlink - elsif ['debian', 'ubuntu'].include?(os[:family]) - if (os[:family] == 'ubuntu' and os[:version] == '17.10') - expect(file("/etc/php/7.1/fpm/pool.d")).to be_symlink - elsif (os[:family] == 'ubuntu' and os[:version] == '18.04') - expect(file("/etc/php/7.2/fpm/pool.d")).to be_symlink - elsif (os[:family] == 'debian' and os[:version] == '10') - expect(file("/etc/php/7.3/fpm/pool.d")).to be_symlink - else - expect(file("/etc/php/7.0/fpm/pool.d")).to be_symlink - end end end end diff --git a/tests/serverspec/spec/shared/php/layout.rb b/tests/serverspec/spec/shared/php/layout.rb index 21a37c6ea..9405f2c1a 100644 --- a/tests/serverspec/spec/shared/php/layout.rb +++ b/tests/serverspec/spec/shared/php/layout.rb @@ -36,6 +36,13 @@ [ "/opt/docker/bin/service.d/php-fpm.sh", "/opt/docker/bin/service.d/php-fpm.d/10-init.sh", + "/usr/local/bin/apt-add-repository", + "/usr/local/bin/apt-update", + "/usr/local/bin/docker-image-cleanup", + "/usr/local/bin/generate-locales", + "/usr/local/bin/generate-dockerimage-info", + "/usr/local/bin/docker-run-bootstrap", + "/sbin/gosu", ].each do |file| describe file("#{file}") do # Type check @@ -62,4 +69,9 @@ it { should be_executable.by('others') } end end + + describe file('/usr/sbin/zic'), :if => os[:family] == 'debian' do + it { should be_file } + it { should be_executable } + end end diff --git a/tests/serverspec/spec/shared/php/modules.rb b/tests/serverspec/spec/shared/php/modules.rb index c31fa720a..a14878e64 100644 --- a/tests/serverspec/spec/shared/php/modules.rb +++ b/tests/serverspec/spec/shared/php/modules.rb @@ -4,6 +4,7 @@ shared_examples 'php::modules' do describe command('php -m') do + its(:stdout) { should contain('amqp') } its(:stdout) { should contain('bcmath') } its(:stdout) { should contain('bz2') } its(:stdout) { should contain('calendar') } @@ -13,26 +14,38 @@ its(:stdout) { should contain('date') } its(:stdout) { should contain('dom') } its(:stdout) { should contain('exif') } + its(:stdout) { should contain('excimer') } + its(:stdout) { should contain('FFI') } its(:stdout) { should contain('fileinfo') } its(:stdout) { should contain('filter') } its(:stdout) { should contain('ftp') } its(:stdout) { should contain('gettext') } + its(:stdout) { should contain('gmp') } its(:stdout) { should contain('hash') } its(:stdout) { should contain('iconv') } + its(:stdout) { should contain('imagick') } + its(:stdout) { should contain('imap') } if $testConfiguration[:phpImap] + its(:stdout) { should contain('intl') } its(:stdout) { should contain('json') } - #its(:stdout) { should contain('ldap') } + its(:stdout) { should contain('ldap') } its(:stdout) { should contain('libxml') } its(:stdout) { should contain('mbstring') } + its(:stdout) { should contain('memcached') } + its(:stdout) { should contain('mongodb') } its(:stdout) { should contain('mysqli') } its(:stdout) { should contain('mysqlnd') } its(:stdout) { should contain('openssl') } + its(:stdout) { should contain('opentelemetry') } its(:stdout) { should contain('pcntl') } its(:stdout) { should contain('pcre') } its(:stdout) { should contain('PDO') } its(:stdout) { should contain('pdo_mysql') } + its(:stdout) { should contain('pdo_pgsql') } its(:stdout) { should contain('pdo_sqlite') } + its(:stdout) { should contain('pgsql') } its(:stdout) { should contain('Phar') } its(:stdout) { should contain('posix') } + its(:stdout) { should contain('protobuf') } its(:stdout) { should contain('Reflection') } its(:stdout) { should contain('session') } its(:stdout) { should contain('SimpleXML') } @@ -45,11 +58,13 @@ its(:stdout) { should contain('sysvsem') } its(:stdout) { should contain('sysvshm') } its(:stdout) { should contain('tokenizer') } + its(:stdout) { should contain('vips') } its(:stdout) { should contain('xml') } its(:stdout) { should contain('xmlreader') } - #its(:stdout) { should contain('xmlrpc') } + its(:stdout) { should contain('xmlrpc') } its(:stdout) { should contain('xmlwriter') } its(:stdout) { should contain('xsl') } + its(:stdout) { should contain('yaml') } its(:stdout) { should contain('zip') } its(:stdout) { should contain('zlib') } its(:stdout) { should contain('gd') } @@ -98,9 +113,10 @@ end end -shared_examples 'php5::modules' do +shared_examples 'php::modules::versioned' do describe command('php -m') do its(:stdout) { should contain('shmop') } + its(:stdout) { should contain('Zend OPcache') } if ( $testConfiguration[:phpRedis] ) its(:stdout) { should contain('redis') } @@ -112,24 +128,13 @@ end end -shared_examples 'php7::modules' do - describe command('php -m') do - its(:stdout) { should contain('Zend OPcache') } - - if ( $testConfiguration[:phpRedis] ) - its(:stdout) { should contain('redis') } - end - - its(:exit_status) { should eq 0 } - end -end - ########################################################### # PHP FPM ########################################################### shared_examples 'php-fpm::modules' do describe command('curl --insecure --silent --retry 10 --fail http://localhost/php-test.php?test=get_loaded_extensions') do + its(:stdout) { should contain('amqp') } its(:stdout) { should contain('bcmath') } its(:stdout) { should contain('bz2') } its(:stdout) { should contain('calendar') } @@ -139,26 +144,38 @@ its(:stdout) { should contain('date') } its(:stdout) { should contain('dom') } its(:stdout) { should contain('exif') } + its(:stdout) { should contain('excimer') } + its(:stdout) { should contain('FFI') } its(:stdout) { should contain('fileinfo') } its(:stdout) { should contain('filter') } its(:stdout) { should contain('ftp') } its(:stdout) { should contain('gettext') } + its(:stdout) { should contain('gmp') } its(:stdout) { should contain('hash') } its(:stdout) { should contain('iconv') } + its(:stdout) { should contain('imagick') } + its(:stdout) { should contain('imap') } if $testConfiguration[:phpImap] + its(:stdout) { should contain('intl') } its(:stdout) { should contain('json') } - #its(:stdout) { should contain('ldap') } + its(:stdout) { should contain('ldap') } its(:stdout) { should contain('libxml') } its(:stdout) { should contain('mbstring') } + its(:stdout) { should contain('memcached') } + its(:stdout) { should contain('mongodb') } its(:stdout) { should contain('mysqli') } its(:stdout) { should contain('mysqlnd') } its(:stdout) { should contain('openssl') } + its(:stdout) { should contain('opentelemetry') } #its(:stdout) { should_not contain('pcntl') } # disabled by fpm its(:stdout) { should contain('pcre') } its(:stdout) { should contain('PDO') } its(:stdout) { should contain('pdo_mysql') } + its(:stdout) { should contain('pdo_pgsql') } its(:stdout) { should contain('pdo_sqlite') } + its(:stdout) { should contain('pgsql') } its(:stdout) { should contain('Phar') } its(:stdout) { should contain('posix') } + its(:stdout) { should contain('protobuf') } its(:stdout) { should contain('Reflection') } its(:stdout) { should contain('session') } its(:stdout) { should contain('SimpleXML') } @@ -171,11 +188,13 @@ its(:stdout) { should contain('sysvsem') } its(:stdout) { should contain('sysvshm') } its(:stdout) { should contain('tokenizer') } + its(:stdout) { should contain('vips') } its(:stdout) { should contain('xml') } its(:stdout) { should contain('xmlreader') } - # its(:stdout) { should contain('xmlrpc') } + its(:stdout) { should contain('xmlrpc') } its(:stdout) { should contain('xmlwriter') } its(:stdout) { should contain('xsl') } + its(:stdout) { should contain('yaml') } its(:stdout) { should contain('zip') } its(:stdout) { should contain('zlib') } its(:stdout) { should contain('gd') } @@ -217,22 +236,9 @@ end end -shared_examples 'php-fpm5::modules' do +shared_examples 'php-fpm::versioned::modules' do describe command('curl --insecure --silent --retry 10 --fail http://localhost/php-test.php?test=get_loaded_extensions') do its(:stdout) { should contain('shmop') } - - if ( $testConfiguration[:phpRedis] ) - its(:stdout) { should contain('redis') } - else - its(:stdout) { should_not contain('redis') } - end - - its(:exit_status) { should eq 0 } - end -end - -shared_examples 'php-fpm7::modules' do - describe command('curl --insecure --silent --retry 10 --fail http://localhost/php-test.php?test=get_loaded_extensions') do its(:stdout) { should contain('Zend OPcache') } if ( $testConfiguration[:phpRedis] ) diff --git a/tests/serverspec/spec/shared/php/test.rb b/tests/serverspec/spec/shared/php/test.rb index bdc2d447b..45a50fa39 100644 --- a/tests/serverspec/spec/shared/php/test.rb +++ b/tests/serverspec/spec/shared/php/test.rb @@ -113,7 +113,7 @@ end end -shared_examples 'php5::fpm::test::version' do +shared_examples 'php::fpm::test::version' do [ 'http://localhost/php-test.php?test=version', 'https://localhost/php-test.php?test=version' @@ -126,27 +126,7 @@ expect(cmd.stdout).not_to contain('PHP Warning') expect(cmd.stdout).not_to contain('Warning') expect(cmd.stdout).not_to contain('Fatal Error') - expect(cmd.stdout).to match %r!PHP 5\.[3-9]\.[0-9]{1,2}(-[^\(]*)?! - expect(cmd.exit_status).to eq 0 - end - end - end -end - -shared_examples 'php7::fpm::test::version' do - [ - 'http://localhost/php-test.php?test=version', - 'https://localhost/php-test.php?test=version' - ].each do |url| - describe url do - it "should have running and answering webserver", :retry => 20, :retry_wait => 3 do - cmd = command("curl --insecure --silent --retry 10 --fail #{url}") - expect(cmd.stdout).not_to contain('PHP Notice') - expect(cmd.stdout).not_to contain('Notice') - expect(cmd.stdout).not_to contain('PHP Warning') - expect(cmd.stdout).not_to contain('Warning') - expect(cmd.stdout).not_to contain('Fatal Error') - expect(cmd.stdout).to match %r!PHP (?:7|8)\.[0-9]\.[0-9]{1,2}(-[^\(]*)?! + expect(cmd.stdout).to match %r!PHP #{Regexp.escape(ENV.fetch('DOCKER_TAG').split('-', 2).first)}\.[0-9]+(-[^\(]*)?! expect(cmd.exit_status).to eq 0 end end diff --git a/tests/serverspec/spec/shared/php/version.rb b/tests/serverspec/spec/shared/php/version.rb index cb5906bd5..aaaa62ae5 100644 --- a/tests/serverspec/spec/shared/php/version.rb +++ b/tests/serverspec/spec/shared/php/version.rb @@ -1,14 +1,6 @@ -shared_examples 'php5::cli::version' do +shared_examples 'php::cli::version' do describe command('php -v') do - its(:stdout) { should match %r!PHP 5\.[3-9]\.[0-9]{1,2}(-[^\(]*)? \(cli\)! } - - its(:exit_status) { should eq 0 } - end -end - -shared_examples 'php7::cli::version' do - describe command('php -v') do - its(:stdout) { should match %r!PHP (?:7|8)\.[0-9]\.[0-9]{1,2}(RC[0-9]|beta[0-9])?(-[^\(]*)? \(cli\)! } + its(:stdout) { should match %r!PHP #{Regexp.escape(ENV.fetch('DOCKER_TAG').split('-', 2).first)}\.[0-9]+(RC[0-9]|beta[0-9])?(-[^\(]*)? \(cli\)! } its(:exit_status) { should eq 0 } end diff --git a/tests/serverspec/spec/spec_config.rb b/tests/serverspec/spec/spec_config.rb index 658d58be2..d82312f36 100644 --- a/tests/serverspec/spec/spec_config.rb +++ b/tests/serverspec/spec/spec_config.rb @@ -35,41 +35,12 @@ $testConfiguration[:ansiblePath] = "/usr/local/bin" end -$testConfiguration[:php] = 7 $testConfiguration[:phpXdebug] = true $testConfiguration[:phpApcu] = true $testConfiguration[:phpRedis] = true $testConfiguration[:phpBlackfire] = false $testConfiguration[:phpOfficialImage] = false - -if ((os[:family] == 'ubuntu' and os[:version] == '12.04') or - (os[:family] == 'ubuntu' and os[:version] == '14.04') or - (os[:family] == 'ubuntu' and os[:version] == '15.04') or - (os[:family] == 'ubuntu' and os[:version] == '15.10') or - (os[:family] == 'redhat' and os[:version] == '7') or - (os[:family] == 'debian' and os[:version] == '7') or - (os[:family] == 'debian' and os[:version] == '8') or - (ENV['DOCKER_TAG'].match('php5')) or - (ENV['DOCKER_TAG'].match('alpine-3')) or - (ENV['DOCKER_TAG'] =~ /^5\.[0-9]+/) - ) - $testConfiguration[:php] = 5 -end - -if ((ENV['DOCKER_TAG'].match('php7')) or - (ENV['DOCKER_TAG'] =~ /^7\.[0-9]+/) - ) - $testConfiguration[:php] = 7 -end - -if (ENV['DOCKER_TAG'] =~ /^8\.[0-9]+/) - $testConfiguration[:php] = 8 -end - -$testConfiguration[:phpImap] = false -if (ENV['DOCKER_TAG'] =~ /^8\.[23](-|$)/) - $testConfiguration[:phpImap] = true -end +$testConfiguration[:phpImap] = !!(ENV['DOCKER_TAG'] =~ /^8\.[123](-|$)/) if ENV['PHP_OFFICIAL'] and ENV['PHP_OFFICIAL'] == "1" $testConfiguration[:phpOfficialImage] = true diff --git a/tests/structure-test/php/5.6 b/tests/structure-test/php/5.6 deleted file mode 120000 index be4cea5e2..000000000 --- a/tests/structure-test/php/5.6 +++ /dev/null @@ -1 +0,0 @@ -7.2 \ No newline at end of file diff --git a/tests/structure-test/php/7.0 b/tests/structure-test/php/7.0 deleted file mode 120000 index be4cea5e2..000000000 --- a/tests/structure-test/php/7.0 +++ /dev/null @@ -1 +0,0 @@ -7.2 \ No newline at end of file diff --git a/tests/structure-test/php/7.1 b/tests/structure-test/php/7.1 deleted file mode 120000 index be4cea5e2..000000000 --- a/tests/structure-test/php/7.1 +++ /dev/null @@ -1 +0,0 @@ -7.2 \ No newline at end of file diff --git a/tests/structure-test/php/7.2/test.yaml b/tests/structure-test/php/7.2/test.yaml deleted file mode 100644 index 46cd5a84c..000000000 --- a/tests/structure-test/php/7.2/test.yaml +++ /dev/null @@ -1,231 +0,0 @@ -schemaVersion: "2.0.0" - -metadataTest: -# base - entrypoint: ["/entrypoint"] - cmd: ["supervisord"] - envVars: - # bootstrap - - key: "LC_ALL" - value: "C.UTF-8" - - key: "LANG" - value: "C.UTF-8" - - key: "TERM" - value: "xterm" - # base - - key: "DOCKER_CONF_HOME" - value: "/opt/docker/" - - key: "LOG_STDOUT" - value: "" - - key: "LOG_STDERR" - value: "" - # base-app - - key: "APPLICATION_USER" - value: "application" - - key: "APPLICATION_GROUP" - value: "application" - - key: "APPLICATION_PATH" - value: "/app" - - key: "APPLICATION_UID" - value: "1000" - - key: "APPLICATION_GID" - value: "1000" - -fileExistenceTests: -# bootstrap - - name: 'apk add wrapper' - path: '/usr/local/bin/apk-install' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'apk upgrade wrapper' - path: '/usr/local/bin/apk-upgrade' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'apt-add-repository wrapper with auto cleanup' - path: '/usr/local/bin/apt-add-repository' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'apt-get install wrapper with auto cleanup' - path: '/usr/local/bin/apt-install' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'apt-get update wrapper for multiple apt-install runs' - path: '/usr/local/bin/apt-update' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'apt-get upgrade wrapper with auto cleanup' - path: '/usr/local/bin/apt-upgrade' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'yum install wrapper with auto cleanup' - path: '/usr/local/bin/yum-install' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'yum upgrade wrapper with auto cleanup' - path: '/usr/local/bin/yum-upgrade' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'Cleanup for docker images after package installations' - path: '/usr/local/bin/docker-image-cleanup' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'Gets information about the current docker images' - path: '/usr/local/bin/docker-image-info' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'Generates system locales' - path: '/usr/local/bin/generate-locales' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'Generates docker image info' - path: '/usr/local/bin/generate-dockerimage-info' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'Bootstrapping script' - path: '/usr/local/bin/docker-run-bootstrap' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'go-replace tool' - path: '/usr/local/bin/go-replace' - shouldExist: true - permissions: '-rwxr-xr-x' - - name: 'gosu tool' - path: '/sbin/gosu' - shouldExist: true - permissions: 'ugrwxr-xr-x' -# base - - name: 'bin: bootstrap script' - path: '/opt/docker/bin/bootstrap.sh' - shouldExist: true - permissions: '-rwxrwxrwx' - - name: 'bin: config script' - path: '/opt/docker/bin/config.sh' - shouldExist: true - permissions: '-rwxrwxrwx' - - name: 'bin: control script' - path: '/opt/docker/bin/control.sh' - shouldExist: true - permissions: '-rwxrwxrwx' - - name: 'bin: entrypoint script' - path: '/opt/docker/bin/entrypoint.sh' - shouldExist: true - permissions: '-rwxrwxrwx' - - name: 'bin: supervisor entrypoint script' - path: '/opt/docker/bin/service.d/supervisor.sh' - shouldExist: true - permissions: '-rwxrwxrwx' - - name: 'configfile: supervisor base' - path: '/opt/docker/etc/supervisor.conf' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'configfile: supervisor service cron' - path: '/opt/docker/etc/supervisor.d/cron.conf' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'configfile: supervisor service dnsmasq' - path: '/opt/docker/etc/supervisor.d/dnsmasq.conf' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'configfile: supervisor service postfix' - path: '/opt/docker/etc/supervisor.d/postfix.conf' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'configfile: supervisor service ssh' - path: '/opt/docker/etc/supervisor.d/ssh.conf' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'configfile: supervisor service syslog' - path: '/opt/docker/etc/supervisor.d/syslog.conf' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'configfile: logrotate' - path: '/opt/docker/etc/logrotate.d/syslog-ng' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'configfile: syslog-ng' - path: '/opt/docker/etc/syslog-ng/syslog-ng.conf' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'provisioning: cron' - path: '/opt/docker/provision/service.d/cron.sh' - shouldExist: false - - name: 'provisioning: dnsmasq' - path: '/opt/docker/provision/service.d/dnsmasq.sh' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'provisioning: postfix' - path: '/opt/docker/provision/service.d/postfix.sh' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'provisioning: ssh' - path: '/opt/docker/provision/service.d/ssh.sh' - shouldExist: true - permissions: '-rw-rw-rw-' - - name: 'provisioning: syslog' - path: '/opt/docker/provision/service.d/syslog.sh' - shouldExist: false -# base-app - - name: 'provision: add application user script was deleted after execution' - path: '/opt/docker/provision/bootstrap.d/10-user-application.sh' - shouldExist: false - - name: 'provision: set permission script was deleted after execution' - path: '/opt/docker/provision/bootstrap.d/20-app.sh' - shouldExist: false - - name: 'app folder exists' - path: '/app' - shouldExist: true - permissions: 'drwxr-xr-x' - uid: 1000 - gid: 1000 - -commandTests: -# base - - name: "supervisord" - command: "which" - args: ["supervisord"] - expectedOutput: ["/usr/bin/supervisord"] - - name: "wget" - command: "which" - args: ["wget"] - expectedOutput: ["/usr/bin/wget"] - - name: "curl" - command: "which" - args: ["curl"] - expectedOutput: ["/usr/bin/curl"] - - name: "zic" - command: "which" - args: ["zic"] - expectedOutput: ["/usr/sbin/zic"] -# base-app - - name: "application user and group exists" - command: "id" - args: ["application"] - expectedOutput: ['uid\=1000\(application\) gid\=1000\(application\) groups\=1000\(application\)'] - - name: "zip" - command: "which" - args: ["zip"] - expectedOutput: ["/usr/bin/zip"] - - name: "unzip" - command: "which" - args: ["unzip"] - expectedOutput: ["/usr/bin/unzip"] - - name: "nslookup" - command: "which" - args: ["nslookup"] - expectedOutput: ["/usr/bin/nslookup"] - - name: "ssh" - command: "which" - args: ["ssh"] - expectedOutput: ["/usr/bin/ssh"] - - name: "rsync" - command: "which" - args: ["rsync"] - expectedOutput: ["/usr/bin/rsync"] - - name: "git" - command: "which" - args: ["git"] - expectedOutput: ["/usr/bin/git"] - - name: "patch" - command: "which" - args: ["patch"] - expectedOutput: ["/usr/bin/patch"] diff --git a/tests/structure-test/php/test.yaml b/tests/structure-test/php/test.yaml index 9d1ca021e..4ae5937d0 100644 --- a/tests/structure-test/php/test.yaml +++ b/tests/structure-test/php/test.yaml @@ -1,7 +1,32 @@ schemaVersion: "2.0.0" metadataTest: + entrypoint: ["/entrypoint"] + cmd: ["supervisord"] exposedPorts: ["9000"] + envVars: + - key: "LC_ALL" + value: "C.UTF-8" + - key: "LANG" + value: "C.UTF-8" + - key: "TERM" + value: "xterm" + - key: "DOCKER_CONF_HOME" + value: "/opt/docker/" + - key: "LOG_STDOUT" + value: "" + - key: "LOG_STDERR" + value: "" + - key: "APPLICATION_USER" + value: "application" + - key: "APPLICATION_GROUP" + value: "application" + - key: "APPLICATION_PATH" + value: "/app" + - key: "APPLICATION_UID" + value: "1000" + - key: "APPLICATION_GID" + value: "1000" fileExistenceTests: - name: 'provision: set php version variable script was deleted after execution' @@ -10,6 +35,12 @@ fileExistenceTests: - name: 'provision: set permission script was deleted after execution' path: '/opt/docker/provision/bootstrap.d/11-php-conf.sh' shouldExist: false + - name: 'provision: cron installer was deleted after enabling the service' + path: '/opt/docker/provision/service.d/cron.sh' + shouldExist: false + - name: 'provision: syslog installer was deleted after enabling the service' + path: '/opt/docker/provision/service.d/syslog.sh' + shouldExist: false - name: 'provision: fpm config was created' path: '/opt/docker/etc/php/fpm/php-fpm.conf' shouldExist: true @@ -25,6 +56,30 @@ fileExistenceTests: - name: 'supervisor: fpm starter exists' path: '/opt/docker/etc/supervisor.d/php-fpm.conf' shouldExist: true + - name: 'provision: dnsmasq installer is retained' + path: '/opt/docker/provision/service.d/dnsmasq.sh' + shouldExist: true + permissions: '-rw-r--r--' + - name: 'provision: postfix installer is retained' + path: '/opt/docker/provision/service.d/postfix.sh' + shouldExist: true + permissions: '-rw-r--r--' + - name: 'provision: ssh installer is retained' + path: '/opt/docker/provision/service.d/ssh.sh' + shouldExist: true + permissions: '-rw-r--r--' + - name: 'provision: add application user script was deleted after execution' + path: '/opt/docker/provision/bootstrap.d/10-user-application.sh' + shouldExist: false + - name: 'provision: set permission script was deleted after execution' + path: '/opt/docker/provision/bootstrap.d/20-app.sh' + shouldExist: false + - name: 'app folder exists and is owned by the application user' + path: '/app' + shouldExist: true + permissions: 'drwxr-xr-x' + uid: 1000 + gid: 1000 fileContentTests: - name: 'supervisor: syslog service is enabled' @@ -35,6 +90,38 @@ fileContentTests: expectedContents: ['autostart = true'] commandTests: + - name: "zip" + command: "which" + args: ["zip"] + expectedOutput: ["/usr/bin/zip"] + - name: "unzip" + command: "which" + args: ["unzip"] + expectedOutput: ["/usr/bin/unzip"] + - name: "nslookup" + command: "which" + args: ["nslookup"] + expectedOutput: ["/usr/bin/nslookup"] + - name: "ssh" + command: "which" + args: ["ssh"] + expectedOutput: ["/usr/bin/ssh"] + - name: "rsync" + command: "which" + args: ["rsync"] + expectedOutput: ["/usr/bin/rsync"] + - name: "git" + command: "which" + args: ["git"] + expectedOutput: ["/usr/bin/git"] + - name: "patch" + command: "which" + args: ["patch"] + expectedOutput: ["/usr/bin/patch"] + - name: "PHP version is 8.1 or newer" + command: "php" + args: ["-v"] + expectedOutput: ['PHP 8\.[1-9][0-9]*\.'] - name: "fpm config test" command: "/usr/local/bin/php-fpm" args: ["-t"] @@ -66,7 +153,8 @@ commandTests: - name: "php modules" command: "php" args: ["-m"] - expectedOutput: + expectedOutput: &phpModules + - "amqp" - "apcu" - "bcmath" - "bz2" @@ -77,22 +165,28 @@ commandTests: - "date" - "dom" - "exif" + - "excimer" + - "FFI" - "fileinfo" - "filter" - "ftp" - "gd" - "gettext" + - "gmp" - "hash" - "iconv" + - "imagick" - "intl" - "json" - "ldap" - "libxml" - "mbstring" - "memcached" + - "mongodb" - "mysqli" - "mysqlnd" - "openssl" + - "opentelemetry" - "pcntl" - "pcre" - "PDO" @@ -102,6 +196,7 @@ commandTests: - "pgsql" - "Phar" - "posix" + - "protobuf" - "readline" - "redis" - "Reflection" @@ -117,12 +212,17 @@ commandTests: - "sysvsem" - "sysvshm" - "tokenizer" + - "vips" - "xml" - "xmlreader" - "xmlrpc" - "xmlwriter" - "xsl" + - "yaml" - "Zend OPcache" - "zip" - "zlib" - + - name: "fpm modules" + command: "/usr/local/bin/php-fpm" + args: ["-m"] + expectedOutput: *phpModules