Skip to content

Commit 4dfa2ef

Browse files
committed
Merge branch 'main' into al2023
# Conflicts: # php-83/Dockerfile # tests/test_2_extensions.php # utils/lib-copy/libs-arm.txt # utils/lib-copy/libs-x86.txt
2 parents ac68d32 + 73636ed commit 4dfa2ef

File tree

8 files changed

+649
-50
lines changed

8 files changed

+649
-50
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
script: |
2626
const matrix = {
2727
cpu: ['x86', 'arm'],
28-
php_version: ['80', '81', '82', '83'],
28+
php_version: ['80', '81', '82', '83', '84'],
2929
}
3030
3131
// If this is a third-party pull request, skip ARM builds

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ default: docker-images layers
3535

3636

3737
# Build Docker images *locally*
38-
docker-images: docker-images-php-80 docker-images-php-81 docker-images-php-82 docker-images-php-83
38+
docker-images: docker-images-php-80 docker-images-php-81 docker-images-php-82 docker-images-php-83 docker-images-php-84
3939
docker-images-php-%:
4040
PHP_VERSION=$* ${BAKE_COMMAND} --load
4141

4242

4343
# Build Lambda layers (zip files) *locally*
44-
layers: layer-php-80 layer-php-81 layer-php-82 layer-php-83 layer-php-80-fpm layer-php-81-fpm layer-php-82-fpm layer-php-83-fpm
44+
layers: layer-php-80 layer-php-81 layer-php-82 layer-php-83 layer-php-84 layer-php-80-fpm layer-php-81-fpm layer-php-82-fpm layer-php-83-fpm layer-php-84-fpm
4545
# Build the console layer only once (x86 and single PHP version)
4646
@if [ ${CPU} = "x86" ]; then \
4747
$(MAKE) layer-console; \
@@ -57,7 +57,7 @@ layer-%:
5757
# Upload the layers to AWS Lambda
5858
# Uses the current AWS_PROFILE. Most users will not want to use this option
5959
# as this will publish all layers to all regions + publish all Docker images.
60-
upload-layers: upload-layers-php-80 upload-layers-php-81 upload-layers-php-82 upload-layers-php-83
60+
upload-layers: upload-layers-php-80 upload-layers-php-81 upload-layers-php-82 upload-layers-php-83 upload-layers-php-84
6161
# Upload the console layer only once (x86 and single PHP version)
6262
@if [ ${CPU} = "x86" ]; then \
6363
LAYER_NAME=console $(MAKE) -C ./utils/lambda-publish publish-parallel; \
@@ -70,7 +70,7 @@ upload-layers-php-%:
7070

7171

7272
# Publish Docker images to Docker Hub.
73-
upload-to-docker-hub: upload-to-docker-hub-php-80 upload-to-docker-hub-php-81 upload-to-docker-hub-php-82 upload-to-docker-hub-php-83
73+
upload-to-docker-hub: upload-to-docker-hub-php-80 upload-to-docker-hub-php-81 upload-to-docker-hub-php-82 upload-to-docker-hub-php-83 upload-to-docker-hub-php-84
7474
upload-to-docker-hub-php-%:
7575
# Make sure we have defined the docker tag
7676
(test $(DOCKER_TAG)) && echo "Tagging images with \"${DOCKER_TAG}\"" || echo "You have to define environment variable DOCKER_TAG"
@@ -86,12 +86,12 @@ upload-to-docker-hub-php-%:
8686
done
8787

8888

89-
test: test-80 test-81 test-82 test-83
89+
test: test-80 test-81 test-82 test-83 test-84
9090
test-%:
9191
cd tests && $(MAKE) test-$*
9292

9393

94-
clean: clean-80 clean-81 clean-82 clean-83
94+
clean: clean-80 clean-81 clean-82 clean-83 clean-84
9595
# Clear the build cache, else all images will be rebuilt using cached layers
9696
docker builder prune
9797
# Remove zip files

layers/fpm-dev/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ ARG PHP_VERSION
1010
RUN mkdir -p /opt/bref/extensions
1111

1212
# Install xdebug
13-
RUN pecl install xdebug
13+
run if [[ $PHP_VERSION != "84" ]]; then pecl install xdebug-3.3.2; else pecl install xdebug-3.4.0beta1; fi
1414
RUN cp $(php -r "echo ini_get('extension_dir');")/xdebug.so /opt/bref/extensions
1515

1616
# Install Blackfire
1717
# https://blackfire.io/docs/up-and-running/installation?action=install&mode=full&version=latest&mode=full&location=server&os=manual&language=php#install-the-php-probe
1818
ARG BLACKFIRE_VERSION=1.87.2
19-
RUN if [ $PHP_VERSION != "83" ] && [ $CPU_PREFIX == "" ]; then curl -A "Docker" -o /opt/bref/extensions/blackfire.so -L -s "https://packages.blackfire.io/binaries/blackfire-php/$BLACKFIRE_VERSION/blackfire-php-linux_amd64-php-"$PHP_VERSION".so"; fi
20-
RUN if [ $PHP_VERSION != "83" ] && [ $CPU_PREFIX == "arm-" ]; then curl -A "Docker" -o /opt/bref/extensions/blackfire.so -L -s "https://packages.blackfire.io/binaries/blackfire-php/$BLACKFIRE_VERSION/blackfire-php-linux_arm64-php-"$PHP_VERSION".so"; fi
19+
RUN if [ $PHP_VERSION != "83" ] && [ $PHP_VERSION != "84" ] && [ $CPU_PREFIX == "" ]; then curl -A "Docker" -o /opt/bref/extensions/blackfire.so -L -s "https://packages.blackfire.io/binaries/blackfire-php/$BLACKFIRE_VERSION/blackfire-php-linux_amd64-php-"$PHP_VERSION".so"; fi
20+
RUN if [ $PHP_VERSION != "83" ] && [ $PHP_VERSION != "84" ] && [ $CPU_PREFIX == "arm-" ]; then curl -A "Docker" -o /opt/bref/extensions/blackfire.so -L -s "https://packages.blackfire.io/binaries/blackfire-php/$BLACKFIRE_VERSION/blackfire-php-linux_arm64-php-"$PHP_VERSION".so"; fi
2121

2222

2323
FROM bref/${CPU_PREFIX}php-${PHP_VERSION}-fpm

php-80/Dockerfile

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ RUN mkdir -p ${INSTALL_DIR}/bref/ssl && curl -Lk -o ${CA_BUNDLE} ${CA_BUNDLE_SOU
134134

135135
###############################################################################
136136
# LIBXML2
137-
# https://github.com/GNOME/libxml2/releases
137+
# https://gitlab.gnome.org/GNOME/libxml2/-/releases
138138
# Uses:
139139
# - zlib
140140
# Needed by:
141141
# - php
142142
# - libnghttp2
143-
ENV VERSION_XML2=2.11.7
143+
ENV VERSION_XML2=2.11.9
144144
ENV XML2_BUILD_DIR=${BUILD_DIR}/xml2
145145
RUN set -xe; \
146146
mkdir -p ${XML2_BUILD_DIR}; \
@@ -173,7 +173,7 @@ RUN make install \
173173
# - OpenSSL
174174
# Needed by:
175175
# - curl
176-
ENV VERSION_LIBSSH2=1.11.0
176+
ENV VERSION_LIBSSH2=1.11.1
177177
ENV LIBSSH2_BUILD_DIR=${BUILD_DIR}/libssh2
178178
RUN set -xe; \
179179
mkdir -p ${LIBSSH2_BUILD_DIR}/bin; \
@@ -206,7 +206,7 @@ RUN cmake --build . --target install
206206
# - libxml2
207207
# Needed by:
208208
# - curl
209-
ENV VERSION_NGHTTP2=1.61.0
209+
ENV VERSION_NGHTTP2=1.64.0
210210
ENV NGHTTP2_BUILD_DIR=${BUILD_DIR}/nghttp2
211211
RUN set -xe; \
212212
mkdir -p ${NGHTTP2_BUILD_DIR}; \
@@ -253,7 +253,7 @@ RUN make -j $(nproc) && make install
253253
# # - libnghttp2
254254
# # Needed by:
255255
# # - php
256-
ENV VERSION_CURL=8.6.0
256+
ENV VERSION_CURL=8.10.1
257257
ENV CURL_BUILD_DIR=${BUILD_DIR}/curl
258258
RUN set -xe; \
259259
mkdir -p ${CURL_BUILD_DIR}/bin; \
@@ -293,7 +293,7 @@ RUN make install
293293
# https://github.com/nih-at/libzip/releases
294294
# Needed by:
295295
# - php
296-
ENV VERSION_ZIP=1.10.1
296+
ENV VERSION_ZIP=1.11.1
297297
ENV ZIP_BUILD_DIR=${BUILD_DIR}/zip
298298
RUN set -xe; \
299299
mkdir -p ${ZIP_BUILD_DIR}/bin/; \
@@ -314,11 +314,11 @@ RUN cmake --build . --target install
314314
# https://github.com/jedisct1/libsodium/releases
315315
# Needed by:
316316
# - php
317-
ENV VERSION_LIBSODIUM=1.0.19
317+
ENV VERSION_LIBSODIUM=1.0.20
318318
ENV LIBSODIUM_BUILD_DIR=${BUILD_DIR}/libsodium
319319
RUN set -xe; \
320320
mkdir -p ${LIBSODIUM_BUILD_DIR}; \
321-
curl -Ls https://github.com/jedisct1/libsodium/archive/${VERSION_LIBSODIUM}.tar.gz \
321+
curl -Ls https://github.com/jedisct1/libsodium/archive/${VERSION_LIBSODIUM}-RELEASE.tar.gz \
322322
| tar xzC ${LIBSODIUM_BUILD_DIR} --strip-components=1
323323
WORKDIR ${LIBSODIUM_BUILD_DIR}/
324324
RUN CFLAGS="" \
@@ -331,12 +331,12 @@ RUN make install
331331

332332
###############################################################################
333333
# Postgres
334-
# https://github.com/postgres/postgres/releases
334+
# https://github.com/postgres/postgres/tags
335335
# Needs:
336336
# - OpenSSL
337337
# Needed by:
338338
# - php
339-
ENV VERSION_POSTGRES=16.2
339+
ENV VERSION_POSTGRES=16.4
340340
ENV POSTGRES_BUILD_DIR=${BUILD_DIR}/postgres
341341
RUN set -xe; \
342342
mkdir -p ${POSTGRES_BUILD_DIR}/bin; \
@@ -464,7 +464,8 @@ RUN set -xe; \
464464

465465
# Install extensions
466466
# We can install extensions manually or using `pecl`
467-
RUN pecl install APCu
467+
ENV VERSION_APCU=5.1.24
468+
RUN pecl install apcu-${VERSION_APCU}
468469

469470

470471
# ---------------------------------------------------------------
@@ -495,6 +496,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
495496
# Copy the OpenSSL certificates file
496497
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem
497498

499+
# Copy the OpenSSL config
500+
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf
501+
498502

499503
# ---------------------------------------------------------------
500504
# Start from a clean image to copy only the files we need

php-81/Dockerfile

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
ARG IMAGE_VERSION_SUFFIX
55

66
# https://www.php.net/downloads
7-
ARG VERSION_PHP=8.1.28
7+
ARG VERSION_PHP=8.1.30
88

99

1010
# Lambda uses a custom AMI named Amazon Linux 2
@@ -104,7 +104,7 @@ RUN set -xe; \
104104
# - curl
105105
# - php
106106
RUN yum install -y perl-IPC-Cmd
107-
ENV VERSION_OPENSSL=3.3.0
107+
ENV VERSION_OPENSSL=3.3.1
108108
ENV OPENSSL_BUILD_DIR=${BUILD_DIR}/openssl
109109
ENV CA_BUNDLE_SOURCE="https://curl.se/ca/cacert.pem"
110110
ENV CA_BUNDLE="${INSTALL_DIR}/bref/ssl/cert.pem"
@@ -135,13 +135,13 @@ RUN mkdir -p ${INSTALL_DIR}/bref/ssl && curl -Lk -o ${CA_BUNDLE} ${CA_BUNDLE_SOU
135135

136136
###############################################################################
137137
# LIBXML2
138-
# https://github.com/GNOME/libxml2/releases
138+
# https://gitlab.gnome.org/GNOME/libxml2/-/releases
139139
# Uses:
140140
# - zlib
141141
# Needed by:
142142
# - php
143143
# - libnghttp2
144-
ENV VERSION_XML2=2.12.6
144+
ENV VERSION_XML2=2.12.9
145145
ENV XML2_BUILD_DIR=${BUILD_DIR}/xml2
146146
RUN set -xe; \
147147
mkdir -p ${XML2_BUILD_DIR}; \
@@ -174,7 +174,7 @@ RUN make install \
174174
# - OpenSSL
175175
# Needed by:
176176
# - curl
177-
ENV VERSION_LIBSSH2=1.11.0
177+
ENV VERSION_LIBSSH2=1.11.1
178178
ENV LIBSSH2_BUILD_DIR=${BUILD_DIR}/libssh2
179179
RUN set -xe; \
180180
mkdir -p ${LIBSSH2_BUILD_DIR}/bin; \
@@ -207,7 +207,7 @@ RUN cmake --build . --target install
207207
# - libxml2
208208
# Needed by:
209209
# - curl
210-
ENV VERSION_NGHTTP2=1.61.0
210+
ENV VERSION_NGHTTP2=1.64.0
211211
ENV NGHTTP2_BUILD_DIR=${BUILD_DIR}/nghttp2
212212
RUN set -xe; \
213213
mkdir -p ${NGHTTP2_BUILD_DIR}; \
@@ -254,7 +254,7 @@ RUN make -j $(nproc) && make install
254254
# # - libnghttp2
255255
# # Needed by:
256256
# # - php
257-
ENV VERSION_CURL=8.6.0
257+
ENV VERSION_CURL=8.10.1
258258
ENV CURL_BUILD_DIR=${BUILD_DIR}/curl
259259
RUN set -xe; \
260260
mkdir -p ${CURL_BUILD_DIR}/bin; \
@@ -294,7 +294,7 @@ RUN make install
294294
# https://github.com/nih-at/libzip/releases
295295
# Needed by:
296296
# - php
297-
ENV VERSION_ZIP=1.10.1
297+
ENV VERSION_ZIP=1.11.1
298298
ENV ZIP_BUILD_DIR=${BUILD_DIR}/zip
299299
RUN set -xe; \
300300
mkdir -p ${ZIP_BUILD_DIR}/bin/; \
@@ -315,11 +315,11 @@ RUN cmake --build . --target install
315315
# https://github.com/jedisct1/libsodium/releases
316316
# Needed by:
317317
# - php
318-
ENV VERSION_LIBSODIUM=1.0.19
318+
ENV VERSION_LIBSODIUM=1.0.20
319319
ENV LIBSODIUM_BUILD_DIR=${BUILD_DIR}/libsodium
320320
RUN set -xe; \
321321
mkdir -p ${LIBSODIUM_BUILD_DIR}; \
322-
curl -Ls https://github.com/jedisct1/libsodium/archive/${VERSION_LIBSODIUM}.tar.gz \
322+
curl -Ls https://github.com/jedisct1/libsodium/archive/${VERSION_LIBSODIUM}-RELEASE.tar.gz \
323323
| tar xzC ${LIBSODIUM_BUILD_DIR} --strip-components=1
324324
WORKDIR ${LIBSODIUM_BUILD_DIR}/
325325
RUN CFLAGS="" \
@@ -332,12 +332,12 @@ RUN make install
332332

333333
###############################################################################
334334
# Postgres
335-
# https://github.com/postgres/postgres/releases
335+
# https://github.com/postgres/postgres/tags
336336
# Needs:
337337
# - OpenSSL
338338
# Needed by:
339339
# - php
340-
ENV VERSION_POSTGRES=16.2
340+
ENV VERSION_POSTGRES=16.4
341341
ENV POSTGRES_BUILD_DIR=${BUILD_DIR}/postgres
342342
RUN set -xe; \
343343
mkdir -p ${POSTGRES_BUILD_DIR}/bin; \
@@ -465,7 +465,8 @@ RUN set -xe; \
465465

466466
# Install extensions
467467
# We can install extensions manually or using `pecl`
468-
RUN pecl install APCu
468+
ENV VERSION_APCU=5.1.24
469+
RUN pecl install apcu-${VERSION_APCU}
469470

470471

471472
# ---------------------------------------------------------------
@@ -496,6 +497,9 @@ RUN php /bref/lib-copy/copy-dependencies.php /bref-layer/bref/extensions/pdo_pgs
496497
# Copy the OpenSSL certificates file
497498
RUN cp ${CA_BUNDLE} /bref-layer/bref/ssl/cert.pem
498499

500+
# Copy the OpenSSL config
501+
RUN cp ${INSTALL_DIR}/bref/ssl/openssl.cnf /bref-layer/bref/ssl/openssl.cnf
502+
499503

500504
# ---------------------------------------------------------------
501505
# Start from a clean image to copy only the files we need

0 commit comments

Comments
 (0)