diff --git a/.prettyci.composer.json b/.prettyci.composer.json deleted file mode 100644 index 5ae6e7a5..00000000 --- a/.prettyci.composer.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "require": { - "doctrine/coding-standard": "^5.0" - } -} diff --git a/CHANGELOG.md b/CHANGELOG.md index d87f1620..fcfde9d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Change log +## 3.0.0 + +- Bref v3 compatibility. +- No longer compatible with Bref v2. If you use Bref v2, use the `1.x` version of the Bref extra extensions. + +## 2.0.0 + +There is no 2.0.0 version. We're skipping v2 to jump to v3 to align with the version of Bref. + +As a reminder: + +- v1 of the extra extensions is compatible with Bref v2 (that was confusing). +- v3 of the extra extensions is compatible with Bref v3. + ## 1.8.7 - Updated Blackfire to version 1.92.53. diff --git a/Makefile b/Makefile index 224f2ce7..11d4f84a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ SHELL := /bin/bash layer ?= * resolve_php_versions = $(or $(php_versions),`jq -r '.php | join(" ")' ${1}/config.json`) resolve_tags = `./new-docker-tags.php $(DOCKER_TAG)` -BREF_VERSION = 2 +BREF_VERSION = 3 define build_docker_image docker build -t bref/${1}-php-${2} --build-arg PHP_VERSION=${2} --build-arg BREF_VERSION=${BREF_VERSION} ${DOCKER_BUILD_FLAGS} ${1} diff --git a/Readme.md b/Readme.md index 014f5fe6..128e131e 100644 --- a/Readme.md +++ b/Readme.md @@ -8,14 +8,16 @@ a limit of 5 layers per Lambda. You can also utilise the provided docker images > **Note** > -> If you are using Bref v2, you need to use version `1.x` of the `bref/extra-php-extensions` package. +> If you are using Bref v3, you need to use version `3.x` of the `bref/extra-php-extensions` package. +> +> There is no version `2.x` of the `bref/extra-php-extensions` package. > -> If you are using Bref v1, you need to use version `0.x` of the `bref/extra-php-extensions` package. +> If you are using Bref v2, you need to use version `1.x` of the `bref/extra-php-extensions` package. > **Warning** > -> **ARM64 is not supported yet with Bref v2.** +> **ARM64 is not supported with extra extensions.** We are happy to get contributions for other extensions. Sky is the limit! (And also your knowledge with Docker...) @@ -43,7 +45,7 @@ functions: handler: bin/console runtime: php-81 layers: - - ${bref-extra:amqp-php-81} # <----- Example for AMQP layer + - ${bref-extra:amqp-php-83} # <----- Example for AMQP layer ``` ### Available layers diff --git a/composer.json b/composer.json index 06952880..e0d12f0e 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "async-aws/core": "^1.7", "symfony/http-client": "^5.4", "async-aws/lambda": "^1.1", - "bref/logger": "^1.0" + "bref/logger": "^2.0" }, "autoload-dev": { "psr-4": { @@ -19,7 +19,7 @@ } }, "conflict": { - "bref/bref": "<2.1.15" + "bref/bref": "<3.0.0" }, "license": "MIT", "authors": [ diff --git a/layers/amqp/Dockerfile b/layers/amqp/Dockerfile index 91c67444..84e1c490 100644 --- a/layers/amqp/Dockerfile +++ b/layers/amqp/Dockerfile @@ -9,8 +9,7 @@ RUN mkdir -p ${AMQP_BUILD_DIR} # Compile rabbitmq WORKDIR ${AMQP_BUILD_DIR} -# Currently it is not possible to use newer rabbitmq-c version than 0.13.0 because this is -# last version which supports CMake 3.17 which is latest available version in Amazon Linux 2. +RUN LD_LIBRARY_PATH= dnf install -y cmake RUN curl -Ls -o rabbitmq-c.tar.gz https://github.com/alanxz/rabbitmq-c/archive/refs/tags/v0.13.0.tar.gz RUN tar xzf rabbitmq-c.tar.gz WORKDIR ${AMQP_BUILD_DIR}/rabbitmq-c-0.13.0 @@ -19,9 +18,9 @@ RUN cmake --build . --target install # Compile the php amqp extension WORKDIR ${AMQP_BUILD_DIR} -RUN git clone https://github.com/php-amqp/php-amqp +RUN curl -Ls -o php-amqp.tar.gz https://github.com/php-amqp/php-amqp/archive/refs/tags/v2.1.2.tar.gz && \ + tar xzf php-amqp.tar.gz && mv php-amqp-2.1.2 php-amqp WORKDIR ${AMQP_BUILD_DIR}/php-amqp -RUN git checkout v2.1.2 RUN phpize RUN ./configure RUN make -j $(nproc) diff --git a/layers/amqp/config.json b/layers/amqp/config.json index 0fc14890..2bf25de7 100644 --- a/layers/amqp/config.json +++ b/layers/amqp/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/blackfire/config.json b/layers/blackfire/config.json index 0fc14890..2bf25de7 100644 --- a/layers/blackfire/config.json +++ b/layers/blackfire/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/bsdiff/Dockerfile b/layers/bsdiff/Dockerfile index 6c181349..165ea403 100644 --- a/layers/bsdiff/Dockerfile +++ b/layers/bsdiff/Dockerfile @@ -4,7 +4,7 @@ FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext RUN set -ex && \ LD_LIBRARY_PATH= && \ - yum -y install bzip2-devel && \ + dnf -y install bzip2-devel && \ pecl channel-update pecl.php.net && \ yes '' | pecl install bsdiff-stable && \ cp "$(php-config --extension-dir)/bsdiff.so" /tmp/bsdiff.so && \ diff --git a/layers/bsdiff/config.json b/layers/bsdiff/config.json index 0fc14890..2bf25de7 100644 --- a/layers/bsdiff/config.json +++ b/layers/bsdiff/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/calendar/config.json b/layers/calendar/config.json index 0fc14890..2bf25de7 100644 --- a/layers/calendar/config.json +++ b/layers/calendar/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/datadog/Dockerfile b/layers/datadog/Dockerfile index e2b3c0fd..1bf4f8e5 100644 --- a/layers/datadog/Dockerfile +++ b/layers/datadog/Dockerfile @@ -19,6 +19,7 @@ RUN cp "$(php-config --extension-dir)/ddtrace.so" /tmp/ddtrace.so && \ RUN sed -i 's/extension = ddtrace\.so/extension = \/opt\/bref-extra\/ddtrace.so/' /tmp/ext.ini && \ sed -i 's/extension = datadog-profiling\.so/extension = \/opt\/bref-extra\/datadog-profiling.so/' /tmp/ext.ini && \ + sed -i '/extension = ddappsec\.so/d' /tmp/ext.ini && \ sed -i 's/;datadog\.agent_host.*$/datadog\.agent_host = 127.0.0.1/' /tmp/ext.ini && \ sed -i 's/^.*datadog\.appsec\.enabled.*$/datadog.appsec.enabled = Off/' /tmp/ext.ini && \ sed -i 's/datadog\.profiling\.enabled = On/datadog.profiling.enabled = 1/' /tmp/ext.ini diff --git a/layers/datadog/config.json b/layers/datadog/config.json index 0fc14890..2bf25de7 100644 --- a/layers/datadog/config.json +++ b/layers/datadog/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/decimal/config.json b/layers/decimal/config.json index 0fc14890..e6d247a5 100644 --- a/layers/decimal/config.json +++ b/layers/decimal/config.json @@ -1,9 +1,4 @@ { "php": [ - "80", - "81", - "82", - "83", - "84" ] } diff --git a/layers/ds/config.json b/layers/ds/config.json index 0fc14890..2bf25de7 100644 --- a/layers/ds/config.json +++ b/layers/ds/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/elastic-apm/Dockerfile b/layers/elastic-apm/Dockerfile index 2b40d0b7..77d4db99 100644 --- a/layers/elastic-apm/Dockerfile +++ b/layers/elastic-apm/Dockerfile @@ -3,7 +3,7 @@ ARG BREF_VERSION FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext RUN \ - LD_LIBRARY_PATH=/lib64:/lib yum install -y libcurl-devel openssl-devel \ + LD_LIBRARY_PATH=/lib64:/lib dnf install -y libcurl-devel openssl-devel \ && mkdir /tmp/apm \ && curl -L https://github.com/elastic/apm-agent-php/archive/refs/tags/v1.8.4.tar.gz | tar -C /tmp/apm -zx --strip-components=1 \ && cd /tmp/apm/src/ext \ diff --git a/layers/elastic-apm/config.json b/layers/elastic-apm/config.json index eea4b0f4..53e3a9a3 100644 --- a/layers/elastic-apm/config.json +++ b/layers/elastic-apm/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83" ] diff --git a/layers/excimer/config.json b/layers/excimer/config.json index 0fc14890..2bf25de7 100644 --- a/layers/excimer/config.json +++ b/layers/excimer/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/gd/Dockerfile b/layers/gd/Dockerfile index 1ebe8af0..b9976b61 100644 --- a/layers/gd/Dockerfile +++ b/layers/gd/Dockerfile @@ -5,7 +5,7 @@ FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext # Install required build libraries RUN set -ue \ ; LD_LIBRARY_PATH= \ - ; yum -y install \ + ; dnf -y install \ libwebp-devel \ libXpm-devel \ libpng-devel \ diff --git a/layers/gd/config.json b/layers/gd/config.json index 0fc14890..2bf25de7 100644 --- a/layers/gd/config.json +++ b/layers/gd/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/gmp/Dockerfile b/layers/gmp/Dockerfile index 790f3b52..aa7ce183 100644 --- a/layers/gmp/Dockerfile +++ b/layers/gmp/Dockerfile @@ -6,7 +6,7 @@ FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH # Install packages -RUN yum install -y gmp-devel +RUN dnf install -y gmp-devel # Build PHP extension WORKDIR ${PHP_BUILD_DIR}/ext/gmp diff --git a/layers/gmp/config.json b/layers/gmp/config.json index 0fc14890..2bf25de7 100644 --- a/layers/gmp/config.json +++ b/layers/gmp/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/gnupg/Dockerfile b/layers/gnupg/Dockerfile index 01fdf56c..e3e9b1ed 100644 --- a/layers/gnupg/Dockerfile +++ b/layers/gnupg/Dockerfile @@ -3,7 +3,7 @@ ARG BREF_VERSION FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH -RUN yum install -y gpgme-devel +RUN dnf install -y gpgme-devel RUN pecl install gnupg RUN cp `php-config --extension-dir`/gnupg.so /tmp/gnupg.so diff --git a/layers/gnupg/config.json b/layers/gnupg/config.json index 27864688..2bf25de7 100644 --- a/layers/gnupg/config.json +++ b/layers/gnupg/config.json @@ -1,6 +1,5 @@ { "php": [ - "81", "82", "83", "84" diff --git a/layers/grpc/config.json b/layers/grpc/config.json index 0fc14890..2bf25de7 100644 --- a/layers/grpc/config.json +++ b/layers/grpc/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/h3/Dockerfile b/layers/h3/Dockerfile index 26139da8..f95f4448 100644 --- a/layers/h3/Dockerfile +++ b/layers/h3/Dockerfile @@ -9,9 +9,10 @@ RUN mkdir -p ${H3_BUILD_DIR} # Compile h3 WORKDIR ${H3_BUILD_DIR} -RUN git clone https://github.com/uber/h3.git && \ - cd h3 && \ - git checkout v3.7.2 && \ +RUN LD_LIBRARY_PATH= dnf install -y cmake +RUN curl -Ls -o h3.tar.gz https://github.com/uber/h3/archive/refs/tags/v3.7.2.tar.gz && \ + tar xzf h3.tar.gz && \ + cd h3-3.7.2 && \ cmake -DBUILD_SHARED_LIBS=ON . && \ make -j "$(nproc)" && \ make install diff --git a/layers/h3/config.json b/layers/h3/config.json index 0fc14890..2bf25de7 100644 --- a/layers/h3/config.json +++ b/layers/h3/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/igbinary/config.json b/layers/igbinary/config.json index 0fc14890..2bf25de7 100644 --- a/layers/igbinary/config.json +++ b/layers/igbinary/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/imagick/Dockerfile b/layers/imagick/Dockerfile index 0046ee17..1f896aa6 100644 --- a/layers/imagick/Dockerfile +++ b/layers/imagick/Dockerfile @@ -7,7 +7,6 @@ ENV IMAGICK_VERSION="7.1.1-38" ENV AOM_VERSION="3.10.0" ENV LIBHEIF_VERSION="1.19.3" ENV LIBDE265_VERSION="1.0.15" -ENV LIBWEBP_VERSION="1.4.0" ENV GS_VERSION="9.56.1" ENV IMAGICK_EXT_COMMIT="28f27044e435a2b203e32675e942eb8de620ee58" @@ -15,24 +14,13 @@ ENV IMAGICK_EXT_COMMIT="28f27044e435a2b203e32675e942eb8de620ee58" ENV IMAGICK_BUILD_DIR=${BUILD_DIR}/imagick RUN mkdir -p ${IMAGICK_BUILD_DIR} WORKDIR ${IMAGICK_BUILD_DIR} -RUN LD_LIBRARY_PATH= yum -y install libpng-devel libjpeg-devel lcms2-devel ImageMagick-devel nasm gcc10 gcc10-c++ - -# Use gcc10 as the default compiler, needed for AOM -ENV CXX="/usr/bin/gcc10-g++" -ENV CC="/usr/bin/gcc10-gcc" - -# Compile libwebp since AL2 ships with v0.3, and v0.4 or higher is required to builder the other libs -RUN curl -Ls -o libwebp.tar.gz https://github.com/webmproject/libwebp/archive/refs/tags/v${LIBWEBP_VERSION}.tar.gz && tar xzf libwebp.tar.gz && rm libwebp.tar.gz \ - && cd ${IMAGICK_BUILD_DIR}/libwebp-${LIBWEBP_VERSION} \ - && autoreconf -i && automake && autoconf \ - && ./configure --prefix ${INSTALL_DIR} --exec-prefix ${INSTALL_DIR} \ - && make -j $(nproc) && make install && rm -rf ${IMAGICK_BUILD_DIR}/libwebp-${LIBWEBP_VERSION} +RUN LD_LIBRARY_PATH= dnf -y install libpng-devel libjpeg-devel lcms2-devel libwebp-devel nasm cmake # Compile AOM (libavif dependency for AVIF support) -RUN git clone -b v${AOM_VERSION} --depth 1 https://aomedia.googlesource.com/aom \ +RUN curl -Ls -o aom.tar.gz https://storage.googleapis.com/aom-releases/libaom-${AOM_VERSION}.tar.gz && tar xzf aom.tar.gz && rm aom.tar.gz \ && mkdir -p ${IMAGICK_BUILD_DIR}/aom_build && cd ${IMAGICK_BUILD_DIR}/aom_build \ - && cmake ../aom -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 \ - && make -j $(nproc) && make install && rm -rf ${IMAGICK_BUILD_DIR}/aom && rm -rf ${IMAGICK_BUILD_DIR}/aom_build + && cmake ../libaom-${AOM_VERSION} -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DBUILD_SHARED_LIBS=1 -DENABLE_DOCS=0 -DENABLE_EXAMPLES=0 -DENABLE_TESTDATA=0 -DENABLE_TESTS=0 -DENABLE_TOOLS=0 \ + && make -j $(nproc) && make install && rm -rf ${IMAGICK_BUILD_DIR}/libaom-${AOM_VERSION} && rm -rf ${IMAGICK_BUILD_DIR}/aom_build # Compile libde265 (libheif dependency) RUN curl -Ls -o libde265.tar.gz https://github.com/strukturag/libde265/releases/download/v${LIBDE265_VERSION}/libde265-${LIBDE265_VERSION}.tar.gz && tar xzf libde265.tar.gz && rm libde265.tar.gz \ @@ -46,21 +34,21 @@ RUN curl -Ls -o libheif.tar.gz https://github.com/strukturag/libheif/releases/do && cmake --preset=release-noplugins .. -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \ && make -j $(nproc) && make install && rm -rf ${IMAGICK_BUILD_DIR}/libheif-${LIBHEIF_VERSION} -# Compile gs +# Compile ghostscript from source (the system package requires too many runtime files) RUN curl -Ls -o ghostscript.tar.gz https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-${GS_VERSION}.tar.gz && tar xzf ghostscript.tar.gz && rm ghostscript.tar.gz \ && mkdir -p ${IMAGICK_BUILD_DIR}/ghostscript-${GS_VERSION} && cd ${IMAGICK_BUILD_DIR}/ghostscript-${GS_VERSION} \ && ./configure --prefix ${INSTALL_DIR} --exec-prefix ${INSTALL_DIR} --without-x \ && make -j $(nproc) && cp bin/gs /tmp/gs && rm -rf ${IMAGICK_BUILD_DIR}/ghostscript-${GS_VERSION} -# Compile the ImageMagick library +# Compile the ImageMagick library (AL2023 only has v6, we need v7) RUN curl -Ls -o ImageMagick.tar.gz https://github.com/ImageMagick/ImageMagick/archive/refs/tags/${IMAGICK_VERSION}.tar.gz && tar xzf ImageMagick.tar.gz && rm ImageMagick.tar.gz \ && cd ${IMAGICK_BUILD_DIR}/ImageMagick-${IMAGICK_VERSION} \ && ./configure --prefix ${INSTALL_DIR} --exec-prefix ${INSTALL_DIR} --with-webp --with-heic --disable-static --with-freetype=yes \ && make -j $(nproc) && make install && rm -rf ${IMAGICK_BUILD_DIR}/ImageMagick-${IMAGICK_VERSION} && convert -list configure # Compile the php imagick extension and copy the dependencies -RUN git clone https://github.com/Imagick/imagick && cd imagick \ - &&git reset --hard ${IMAGICK_EXT_COMMIT} \ +RUN curl -Ls -o imagick.tar.gz https://github.com/Imagick/imagick/archive/${IMAGICK_EXT_COMMIT}.tar.gz && tar xzf imagick.tar.gz && rm imagick.tar.gz \ + && cd imagick-${IMAGICK_EXT_COMMIT} \ && phpize && ./configure --with-imagick=${INSTALL_DIR} \ && make -j $(nproc) && make install && cp `php-config --extension-dir`/imagick.so /tmp/imagick.so && strip --strip-debug /tmp/imagick.so && echo 'extension=imagick.so' > /tmp/ext.ini \ && php /bref/lib-copy/copy-dependencies.php /tmp/imagick.so /tmp/extension-libs diff --git a/layers/imagick/config.json b/layers/imagick/config.json index 0fc14890..2bf25de7 100644 --- a/layers/imagick/config.json +++ b/layers/imagick/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/imap/config.json b/layers/imap/config.json index eea4b0f4..e6d247a5 100644 --- a/layers/imap/config.json +++ b/layers/imap/config.json @@ -1,8 +1,4 @@ { "php": [ - "80", - "81", - "82", - "83" ] } diff --git a/layers/ldap/Dockerfile b/layers/ldap/Dockerfile index 58f23f8a..f0ae730f 100644 --- a/layers/ldap/Dockerfile +++ b/layers/ldap/Dockerfile @@ -4,7 +4,7 @@ FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH -RUN yum -y install openldap-devel +RUN dnf -y install openldap-devel WORKDIR ${PHP_BUILD_DIR}/ext/ldap RUN phpize diff --git a/layers/ldap/config.json b/layers/ldap/config.json index 0fc14890..2bf25de7 100644 --- a/layers/ldap/config.json +++ b/layers/ldap/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/mailparse/Dockerfile b/layers/mailparse/Dockerfile index f2961563..379ed34f 100644 --- a/layers/mailparse/Dockerfile +++ b/layers/mailparse/Dockerfile @@ -3,9 +3,11 @@ ARG BREF_VERSION FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH -RUN yum install -y re2c +RUN dnf install -y re2c -RUN pecl install mailparse +RUN curl -Ls https://pecl.php.net/get/mailparse | tar xzC /tmp && \ + cd /tmp/mailparse-* && \ + phpize && ./configure && make -j $(nproc) && make install RUN cp `php-config --extension-dir`/mailparse.so /tmp/mailparse.so RUN echo 'extension=mailparse.so' > /tmp/ext.ini diff --git a/layers/mailparse/config.json b/layers/mailparse/config.json index 0fc14890..2bf25de7 100644 --- a/layers/mailparse/config.json +++ b/layers/mailparse/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/maxminddb/config.json b/layers/maxminddb/config.json index 0fc14890..2bf25de7 100644 --- a/layers/maxminddb/config.json +++ b/layers/maxminddb/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/memcache/config.json b/layers/memcache/config.json index d293785a..e6d247a5 100644 --- a/layers/memcache/config.json +++ b/layers/memcache/config.json @@ -1,5 +1,4 @@ { "php": [ - "80" ] } diff --git a/layers/memcached/Dockerfile b/layers/memcached/Dockerfile index 433cf8e9..daeff6db 100644 --- a/layers/memcached/Dockerfile +++ b/layers/memcached/Dockerfile @@ -4,6 +4,8 @@ FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext ENV LIBMEMCACHED_BUILD_DIR=${BUILD_DIR}/libmemcached +RUN LD_LIBRARY_PATH= dnf install -y patch + RUN set -xe; \ mkdir -p ${LIBMEMCACHED_BUILD_DIR}; \ # Download and upack the source code diff --git a/layers/memcached/config.json b/layers/memcached/config.json index eea4b0f4..53e3a9a3 100644 --- a/layers/memcached/config.json +++ b/layers/memcached/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83" ] diff --git a/layers/mongodb/config.json b/layers/mongodb/config.json index 0fc14890..2bf25de7 100644 --- a/layers/mongodb/config.json +++ b/layers/mongodb/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/mongodb2/config.json b/layers/mongodb2/config.json index 27864688..2bf25de7 100644 --- a/layers/mongodb2/config.json +++ b/layers/mongodb2/config.json @@ -1,6 +1,5 @@ { "php": [ - "81", "82", "83", "84" diff --git a/layers/msgpack/config.json b/layers/msgpack/config.json index 0fc14890..2bf25de7 100644 --- a/layers/msgpack/config.json +++ b/layers/msgpack/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/newrelic/config.json b/layers/newrelic/config.json index 0fc14890..2bf25de7 100644 --- a/layers/newrelic/config.json +++ b/layers/newrelic/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/oci8/Dockerfile b/layers/oci8/Dockerfile index 28cdc6fd..a616f5d0 100644 --- a/layers/oci8/Dockerfile +++ b/layers/oci8/Dockerfile @@ -8,7 +8,7 @@ ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH ENV ORACLE_BUILD_DIR=${BUILD_DIR}/oracle # Install libaio -RUN yum install -y libaio +RUN dnf install -y libaio # Instant Client newer than 21.x requires glibc 2.28+ which is not available on Amazon Linux 2 RUN mkdir -p ${ORACLE_BUILD_DIR}; \ diff --git a/layers/oci8/config.json b/layers/oci8/config.json index 0fc14890..e6d247a5 100644 --- a/layers/oci8/config.json +++ b/layers/oci8/config.json @@ -1,9 +1,4 @@ { "php": [ - "80", - "81", - "82", - "83", - "84" ] } diff --git a/layers/odbc-snowflake/Dockerfile b/layers/odbc-snowflake/Dockerfile index b1724468..24274d0a 100644 --- a/layers/odbc-snowflake/Dockerfile +++ b/layers/odbc-snowflake/Dockerfile @@ -3,7 +3,7 @@ ARG BREF_VERSION FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH -RUN yum install -y unixODBC unixODBC-devel +RUN dnf install -y unixODBC unixODBC-devel # strongly inspired by https://github.com/mlocati/docker-php-extension-installer/blob/master/install-php-extensions WORKDIR ${PHP_BUILD_DIR}/ext/odbc diff --git a/layers/odbc-snowflake/config.json b/layers/odbc-snowflake/config.json index 0fc14890..2bf25de7 100644 --- a/layers/odbc-snowflake/config.json +++ b/layers/odbc-snowflake/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/openswoole/config.json b/layers/openswoole/config.json index 782b4264..e6d247a5 100644 --- a/layers/openswoole/config.json +++ b/layers/openswoole/config.json @@ -1,6 +1,4 @@ { "php": [ - "80", - "81" ] } diff --git a/layers/opentelemetry/config.json b/layers/opentelemetry/config.json index 0fc14890..2bf25de7 100644 --- a/layers/opentelemetry/config.json +++ b/layers/opentelemetry/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/pcov/config.json b/layers/pcov/config.json index 0fc14890..2bf25de7 100644 --- a/layers/pcov/config.json +++ b/layers/pcov/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/pgsql/config.json b/layers/pgsql/config.json index 0fc14890..2bf25de7 100644 --- a/layers/pgsql/config.json +++ b/layers/pgsql/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/pgsql/test.php b/layers/pgsql/test.php index d0768590..e69de29b 100644 --- a/layers/pgsql/test.php +++ b/layers/pgsql/test.php @@ -1,8 +0,0 @@ - /tmp/ext.ini - -RUN php /bref/lib-copy/copy-dependencies.php /tmp/relay.so /tmp/extension-libs - - -# Build the final image with just the files we need -FROM scratch - -# Copy things we installed to the final image -COPY --from=ext /tmp/redis.so /opt/bref/extensions/redis.so -COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-redis.ini -COPY --from=ext /tmp/extension-libs /opt/lib diff --git a/layers/redis/config.json b/layers/redis/config.json index 0fc14890..e6d247a5 100644 --- a/layers/redis/config.json +++ b/layers/redis/config.json @@ -1,9 +1,4 @@ { "php": [ - "80", - "81", - "82", - "83", - "84" ] } diff --git a/layers/redis/test.php b/layers/redis/test.php deleted file mode 100644 index 7a8d5b59..00000000 --- a/layers/redis/test.php +++ /dev/null @@ -1,8 +0,0 @@ - /tmp/ext.ini +RUN php /bref/lib-copy/copy-dependencies.php /tmp/ssh2.so /tmp/extension-libs # Build the final image with just the files we need FROM scratch @@ -13,3 +14,4 @@ FROM scratch # Copy things we installed to the final image COPY --from=ext /tmp/ssh2.so /opt/bref/extensions/ssh2.so COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-ssh2.ini +COPY --from=ext /tmp/extension-libs /opt/lib diff --git a/layers/ssh2/config.json b/layers/ssh2/config.json index 0fc14890..2bf25de7 100644 --- a/layers/ssh2/config.json +++ b/layers/ssh2/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/swoole/Dockerfile b/layers/swoole/Dockerfile index 226c35cf..811ca40f 100644 --- a/layers/swoole/Dockerfile +++ b/layers/swoole/Dockerfile @@ -3,7 +3,7 @@ ARG BREF_VERSION FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext RUN set -ex && \ - LD_LIBRARY_PATH=/lib64:/lib yum install -y libcurl-devel postgresql-devel openssl-devel && \ + LD_LIBRARY_PATH=/lib64:/lib dnf install -y libcurl-devel postgresql-devel openssl-devel && \ mkdir ${PHP_BUILD_DIR}/ext/swoole && \ curl -sfL https://github.com/swoole/swoole-src/archive/v5.1.2.tar.gz -o swoole.tar.gz && \ tar xfz swoole.tar.gz --strip-components=1 -C ${PHP_BUILD_DIR}/ext/swoole && \ diff --git a/layers/swoole/config.json b/layers/swoole/config.json index eea4b0f4..e6d247a5 100644 --- a/layers/swoole/config.json +++ b/layers/swoole/config.json @@ -1,8 +1,4 @@ { "php": [ - "80", - "81", - "82", - "83" ] } diff --git a/layers/symfony-runtime/config.json b/layers/symfony-runtime/config.json index 0fc14890..2bf25de7 100644 --- a/layers/symfony-runtime/config.json +++ b/layers/symfony-runtime/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/tideways/config.json b/layers/tideways/config.json index 0fc14890..2bf25de7 100644 --- a/layers/tideways/config.json +++ b/layers/tideways/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/tidy/config.json b/layers/tidy/config.json index 0fc14890..e6d247a5 100644 --- a/layers/tidy/config.json +++ b/layers/tidy/config.json @@ -1,9 +1,4 @@ { "php": [ - "80", - "81", - "82", - "83", - "84" ] } diff --git a/layers/uuid/Dockerfile b/layers/uuid/Dockerfile index ab59c411..dc581b57 100644 --- a/layers/uuid/Dockerfile +++ b/layers/uuid/Dockerfile @@ -4,7 +4,7 @@ FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH -RUN yum install -y libuuid-devel +RUN dnf install -y libuuid-devel RUN pecl install uuid RUN cp `php-config --extension-dir`/uuid.so /tmp/uuid.so diff --git a/layers/uuid/config.json b/layers/uuid/config.json index 0fc14890..2bf25de7 100644 --- a/layers/uuid/config.json +++ b/layers/uuid/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/xdebug/config.json b/layers/xdebug/config.json index 0fc14890..2bf25de7 100644 --- a/layers/xdebug/config.json +++ b/layers/xdebug/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/xlswriter/config.json b/layers/xlswriter/config.json index 0fc14890..2bf25de7 100644 --- a/layers/xlswriter/config.json +++ b/layers/xlswriter/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/xmlrpc/config.json b/layers/xmlrpc/config.json index 0fc14890..2bf25de7 100644 --- a/layers/xmlrpc/config.json +++ b/layers/xmlrpc/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/layers/yaml/config.json b/layers/yaml/config.json index 0fc14890..2bf25de7 100644 --- a/layers/yaml/config.json +++ b/layers/yaml/config.json @@ -1,7 +1,5 @@ { "php": [ - "80", - "81", "82", "83", "84" diff --git a/tests/Dockerfile b/tests/Dockerfile index a173b9bd..792678cc 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -2,7 +2,7 @@ ARG PHP_VERSION ARG TARGET_IMAGE FROM bref/$TARGET_IMAGE AS ext -FROM bref/php-$PHP_VERSION:2 +FROM bref/php-$PHP_VERSION:3 COPY --from=ext /opt /opt ENV ODBCSYSINI=/opt/microsoft/conf/