diff --git a/docker/php-official/8.1-alpine/Dockerfile b/docker/php-official/8.1-alpine/Dockerfile index 75a8cace3..a8664fc4e 100644 --- a/docker/php-official/8.1-alpine/Dockerfile +++ b/docker/php-official/8.1-alpine/Dockerfile @@ -94,6 +94,7 @@ RUN set -x \ rabbitmq-c \ c-client \ # Libraries + libavif \ libldap \ icu-libs \ libintl \ @@ -111,6 +112,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ @@ -144,7 +146,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ @@ -215,6 +217,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ diff --git a/docker/php-official/8.1/Dockerfile b/docker/php-official/8.1/Dockerfile index 24be23a39..3be49f8ee 100644 --- a/docker/php-official/8.1/Dockerfile +++ b/docker/php-official/8.1/Dockerfile @@ -95,6 +95,7 @@ RUN set -x \ pngnq \ pngquant \ # Libraries + libavif15 \ libvips42 \ librabbitmq4 \ libldap-2.5-0 \ @@ -106,6 +107,7 @@ RUN set -x \ libmcrypt4 \ libzip4 \ # Dev and headers + libavif-dev \ libjpeg62-turbo-dev \ libwebp-dev \ libfreetype6-dev \ @@ -139,7 +141,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ @@ -197,6 +199,7 @@ RUN set -x \ libc-client-dev \ libkrb5-dev \ libbz2-dev \ + libavif-dev \ libicu-dev \ libldap2-dev \ libldb-dev \ diff --git a/docker/php-official/8.2-alpine/Dockerfile b/docker/php-official/8.2-alpine/Dockerfile index 8309a82fd..5c1c0f918 100644 --- a/docker/php-official/8.2-alpine/Dockerfile +++ b/docker/php-official/8.2-alpine/Dockerfile @@ -94,6 +94,7 @@ RUN set -x \ rabbitmq-c \ c-client \ # Libraries + libavif \ libldap \ icu-libs \ libintl \ @@ -111,6 +112,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ @@ -144,7 +146,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ @@ -215,6 +217,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ diff --git a/docker/php-official/8.2/Dockerfile b/docker/php-official/8.2/Dockerfile index cde3347c3..ab77b84ef 100644 --- a/docker/php-official/8.2/Dockerfile +++ b/docker/php-official/8.2/Dockerfile @@ -95,6 +95,7 @@ RUN set -x \ pngnq \ pngquant \ # Libraries + libavif15 \ libvips42 \ librabbitmq4 \ libldap-2.5-0 \ @@ -106,6 +107,7 @@ RUN set -x \ libmcrypt4 \ libzip4 \ # Dev and headers + libavif-dev \ libjpeg62-turbo-dev \ libwebp-dev \ libfreetype6-dev \ @@ -139,7 +141,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ @@ -197,6 +199,7 @@ RUN set -x \ libc-client-dev \ libkrb5-dev \ libbz2-dev \ + libavif-dev \ libicu-dev \ libldap2-dev \ libldb-dev \ diff --git a/docker/php-official/8.3-alpine/Dockerfile b/docker/php-official/8.3-alpine/Dockerfile index 79aaf7bbb..42d811e53 100644 --- a/docker/php-official/8.3-alpine/Dockerfile +++ b/docker/php-official/8.3-alpine/Dockerfile @@ -94,6 +94,7 @@ RUN set -x \ rabbitmq-c \ c-client \ # Libraries + libavif \ libldap \ icu-libs \ libintl \ @@ -111,6 +112,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ @@ -144,7 +146,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ @@ -215,6 +217,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ diff --git a/docker/php-official/8.3/Dockerfile b/docker/php-official/8.3/Dockerfile index 7377141ac..4588cbbe6 100644 --- a/docker/php-official/8.3/Dockerfile +++ b/docker/php-official/8.3/Dockerfile @@ -95,6 +95,7 @@ RUN set -x \ pngnq \ pngquant \ # Libraries + libavif15 \ libvips42 \ librabbitmq4 \ libldap-2.5-0 \ @@ -106,6 +107,7 @@ RUN set -x \ libmcrypt4 \ libzip4 \ # Dev and headers + libavif-dev \ libjpeg62-turbo-dev \ libwebp-dev \ libfreetype6-dev \ @@ -139,7 +141,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ @@ -197,6 +199,7 @@ RUN set -x \ libc-client-dev \ libkrb5-dev \ libbz2-dev \ + libavif-dev \ libicu-dev \ libldap2-dev \ libldb-dev \ diff --git a/docker/php-official/8.4-alpine/Dockerfile b/docker/php-official/8.4-alpine/Dockerfile index 9aa55af3d..a07096573 100644 --- a/docker/php-official/8.4-alpine/Dockerfile +++ b/docker/php-official/8.4-alpine/Dockerfile @@ -94,6 +94,7 @@ RUN set -x \ rabbitmq-c \ c-client \ # Libraries + libavif \ libldap \ icu-libs \ libintl \ @@ -111,6 +112,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ @@ -144,7 +146,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ @@ -213,6 +215,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ diff --git a/docker/php-official/8.4/Dockerfile b/docker/php-official/8.4/Dockerfile index eb2bc75e2..db2de2200 100644 --- a/docker/php-official/8.4/Dockerfile +++ b/docker/php-official/8.4/Dockerfile @@ -95,6 +95,7 @@ RUN set -x \ pngnq \ pngquant \ # Libraries + libavif15 \ libvips42 \ librabbitmq4 \ libldap-2.5-0 \ @@ -106,6 +107,7 @@ RUN set -x \ libmcrypt4 \ libzip4 \ # Dev and headers + libavif-dev \ libjpeg62-turbo-dev \ libwebp-dev \ libfreetype6-dev \ @@ -139,7 +141,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ @@ -195,6 +197,7 @@ RUN set -x \ libc-client-dev \ libkrb5-dev \ libbz2-dev \ + libavif-dev \ libicu-dev \ libldap2-dev \ libldb-dev \ diff --git a/docker/php-official/8.5-alpine/Dockerfile b/docker/php-official/8.5-alpine/Dockerfile index 4c3861bd4..7d43095ef 100644 --- a/docker/php-official/8.5-alpine/Dockerfile +++ b/docker/php-official/8.5-alpine/Dockerfile @@ -94,6 +94,7 @@ RUN set -x \ rabbitmq-c \ c-client \ # Libraries + libavif \ libldap \ icu-libs \ libintl \ @@ -111,6 +112,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ @@ -144,7 +146,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ @@ -212,6 +214,7 @@ RUN set -x \ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ diff --git a/docker/php-official/8.5/Dockerfile b/docker/php-official/8.5/Dockerfile index bfda78378..4fa86c8d1 100644 --- a/docker/php-official/8.5/Dockerfile +++ b/docker/php-official/8.5/Dockerfile @@ -95,6 +95,7 @@ RUN set -x \ pngnq \ pngquant \ # Libraries + libavif15 \ libvips42 \ librabbitmq4 \ libldap-2.5-0 \ @@ -106,6 +107,7 @@ RUN set -x \ libmcrypt4 \ libzip4 \ # Dev and headers + libavif-dev \ libjpeg62-turbo-dev \ libwebp-dev \ libfreetype6-dev \ @@ -139,7 +141,7 @@ RUN set -x \ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ @@ -194,6 +196,7 @@ RUN set -x \ libc-client-dev \ libkrb5-dev \ libbz2-dev \ + libavif-dev \ libicu-dev \ libldap2-dev \ libldb-dev \ diff --git a/template/Dockerfile/images/php.jinja2 b/template/Dockerfile/images/php.jinja2 index 3d0f56558..1f9a2b843 100644 --- a/template/Dockerfile/images/php.jinja2 +++ b/template/Dockerfile/images/php.jinja2 @@ -17,6 +17,7 @@ pngnq \ pngquant \ # Libraries + libavif15 \ libvips42 \ librabbitmq4 \ {%- if distribution == 'bookworm' %} @@ -33,6 +34,7 @@ libmcrypt4 \ libzip4 \ # Dev and headers + libavif-dev \ libjpeg62-turbo-dev \ libwebp-dev \ libfreetype6-dev \ @@ -66,7 +68,7 @@ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ @@ -134,6 +136,7 @@ libc-client-dev \ libkrb5-dev \ libbz2-dev \ + libavif-dev \ libicu-dev \ libldap2-dev \ libldb-dev \ @@ -170,6 +173,7 @@ rabbitmq-c \ c-client \ # Libraries + libavif \ libldap \ icu-libs \ libintl \ @@ -187,6 +191,7 @@ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ @@ -224,7 +229,7 @@ && tar -zxf /tmp/icu.tar.gz -C /tmp && cd /tmp/icu/source && ./configure --prefix=/usr/local && make && make install && cd / && rm -rf /tmp/icu* \ # Install extensions && PKG_CONFIG_PATH=/usr/local docker-php-ext-configure intl \ - && docker-php-ext-configure gd --with-jpeg --with-freetype --with-webp \ + && docker-php-ext-configure gd --with-avif --with-jpeg --with-freetype --with-webp \ && git clone --branch master --depth 1 https://github.com/Imagick/imagick.git /usr/src/php/ext/imagick \ && git clone --branch latest --depth 1 https://github.com/php-amqp/php-amqp.git /usr/src/php/ext/amqp \ && cd /usr/src/php/ext/amqp && git submodule update --init \ @@ -305,6 +310,7 @@ libtool \ pcre-dev \ gettext-dev \ + libavif-dev \ freetype-dev \ gmp-dev \ libjpeg-turbo-dev \ diff --git a/tests/serverspec/spec/docker/php-official_spec.rb b/tests/serverspec/spec/docker/php-official_spec.rb index 761952eb2..96488c2c4 100644 --- a/tests/serverspec/spec/docker/php-official_spec.rb +++ b/tests/serverspec/spec/docker/php-official_spec.rb @@ -16,6 +16,7 @@ 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' diff --git a/tests/serverspec/spec/docker/php_spec.rb b/tests/serverspec/spec/docker/php_spec.rb index 761952eb2..96488c2c4 100644 --- a/tests/serverspec/spec/docker/php_spec.rb +++ b/tests/serverspec/spec/docker/php_spec.rb @@ -16,6 +16,7 @@ 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' diff --git a/tests/serverspec/spec/shared/php/test.rb b/tests/serverspec/spec/shared/php/test.rb index 8be5eaf53..f5013b15d 100644 --- a/tests/serverspec/spec/shared/php/test.rb +++ b/tests/serverspec/spec/shared/php/test.rb @@ -13,6 +13,12 @@ end end +shared_examples 'php::cli::test::avif' do + describe command('php -r \'exit((gd_info()["AVIF Support"] ?? false) ? 0 : 1);\'') do + its(:exit_status) { should eq 0 } + end +end + shared_examples 'php::cli::test::php_ini_scanned_files' do describe command('php -r "echo php_ini_scanned_files();"') do its(:stdout) { should contain('-docker.ini') }