Skip to content

Commit 96bd614

Browse files
committed
Fix PHP 8.1 and 8.2 build
1 parent 005e883 commit 96bd614

2 files changed

Lines changed: 63 additions & 60 deletions

File tree

php8/php8.1-fpm-nginx/Dockerfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.1.24-fpm-alpine3.18
1+
FROM php:8.1.24-fpm-alpine3.17
22

33
LABEL maintainer="Touch4IT <admin@touch4it.com>"
44

@@ -30,8 +30,8 @@ RUN apk --update add --no-cache \
3030
libzip-dev \
3131
oniguruma-dev \
3232
patch \
33-
php8-dom \
34-
php8-xml \
33+
php81-dom \
34+
php81-xml \
3535
postgresql-dev \
3636
zip \
3737
${PHPIZE_DEPS}
@@ -78,8 +78,8 @@ RUN curl -sS https://getcomposer.org/installer | php \
7878
# NGINX
7979
#
8080

81-
ENV NGINX_VERSION 1.22.1
82-
ENV NJS_VERSION 0.7.7
81+
ENV NGINX_VERSION 1.24.0
82+
ENV NJS_VERSION 0.7.12
8383
ENV PKG_RELEASE 1
8484

8585
RUN set -x \
@@ -101,9 +101,9 @@ RUN set -x \
101101
x86_64|aarch64) \
102102
# arches officially built by upstream
103103
set -x \
104-
&& KEY_SHA512="e7fa8303923d9b95db37a77ad46c68fd4755ff935d0a534d26eba83de193c76166c68bfe7f65471bf8881004ef4aa6df3e34689c305662750c0172fca5d8552a *stdin" \
104+
&& KEY_SHA512="e09fa32f0a0eab2b879ccbbc4d0e4fb9751486eedda75e35fac65802cc9faa266425edf83e261137a2f4d16281ce2c1a5f4502930fe75154723da014214f0655" \
105105
&& wget -O /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub \
106-
&& if [ "$(openssl rsa -pubin -in /tmp/nginx_signing.rsa.pub -text -noout | openssl sha512 -r)" = "$KEY_SHA512" ]; then \
106+
&& if echo "$KEY_SHA512 */tmp/nginx_signing.rsa.pub" | sha512sum -c -; then \
107107
echo "key verification succeeded!"; \
108108
mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \
109109
else \
@@ -138,7 +138,7 @@ RUN set -x \
138138
export HOME=${tempDir} \
139139
&& cd ${tempDir} \
140140
&& curl -f -O https://hg.nginx.org/pkg-oss/archive/${NGINX_VERSION}-${PKG_RELEASE}.tar.gz \
141-
&& PKGOSSCHECKSUM=\"7266f418dcc9d89a2990f504d99ec58d10febbaf078c03630d42843955cee7e50b0f90fb317360384a32473839dc42d8b329b737015ec8dd0d028f90d4d5ed25 *${NGINX_VERSION}-${PKG_RELEASE}.tar.gz\" \
141+
&& PKGOSSCHECKSUM=\"dc47dbaeb1c0874b264d34ddfec40e7d2b814e7db48d144e12d5991c743ef5fcf780ecbab72324e562dd84bb9c0e4dd71d14850b20ceaf470c46f8fe7510275b *${NGINX_VERSION}-${PKG_RELEASE}.tar.gz\" \
142142
&& if [ \"\$(openssl sha512 -r ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz)\" = \"\$PKGOSSCHECKSUM\" ]; then \
143143
echo \"pkg-oss tarball checksum verification succeeded!\"; \
144144
else \
@@ -183,7 +183,7 @@ RUN set -x \
183183
# Bring in tzdata so users could set the timezones through the environment
184184
# variables
185185
&& apk add --no-cache tzdata \
186-
# Bring in curl and ca-certificates to make registering on DNS SD easier
186+
# Bring in curl and ca-certificates to make registering on DNS SD easier
187187
&& apk add --no-cache curl ca-certificates \
188188
# forward request and error logs to docker log collector
189189
&& ln -sf /dev/stdout /var/log/nginx/access.log \

php8/php8.2-fpm-nginx/Dockerfile

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -13,73 +13,76 @@ ENV PHP_MEMORY_LIMIT 256M
1313
ENV PHP_UPLOAD_MAX_FILESIZE 32M
1414
ENV PHP_POST_MAX_SIZE 32M
1515

16+
RUN apk update
17+
RUN apk search php
18+
1619
RUN apk --update add --no-cache \
17-
acl \
18-
bash \
19-
dcron \
20-
freetype-dev \
21-
gettext-dev \
22-
git \
23-
grep \
24-
icu-dev \
25-
imagemagick \
26-
imagemagick-dev \
27-
libjpeg-turbo-dev \
28-
libpng-dev \
29-
libwebp-dev \
30-
libzip-dev \
31-
oniguruma-dev \
32-
patch \
33-
php82-dom \
34-
php82-xml \
35-
postgresql-dev \
36-
zip \
37-
${PHPIZE_DEPS}
20+
acl \
21+
bash \
22+
dcron \
23+
freetype-dev \
24+
gettext-dev \
25+
git \
26+
grep \
27+
icu-dev \
28+
imagemagick \
29+
imagemagick-dev \
30+
libjpeg-turbo-dev \
31+
libpng-dev \
32+
libwebp-dev \
33+
libzip-dev \
34+
oniguruma-dev \
35+
patch \
36+
php82-dom \
37+
php82-xml \
38+
postgresql-dev \
39+
zip \
40+
${PHPIZE_DEPS}
3841

3942
RUN pecl install imagick \
40-
&& docker-php-ext-configure gd \
41-
--with-freetype \
42-
--with-jpeg \
43-
--with-webp \
44-
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
45-
&& docker-php-ext-configure bcmath --enable-bcmath \
46-
&& docker-php-ext-install \
47-
bcmath \
48-
exif \
49-
gd \
50-
gettext \
51-
intl \
52-
mysqli \
53-
opcache \
54-
pdo_mysql \
55-
pdo_pgsql \
56-
pgsql \
57-
zip \
58-
&& docker-php-ext-enable \
59-
imagick
43+
&& docker-php-ext-configure gd \
44+
--with-freetype \
45+
--with-jpeg \
46+
--with-webp \
47+
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
48+
&& docker-php-ext-configure bcmath --enable-bcmath \
49+
&& docker-php-ext-install \
50+
bcmath \
51+
exif \
52+
gd \
53+
gettext \
54+
intl \
55+
mysqli \
56+
opcache \
57+
pdo_mysql \
58+
pdo_pgsql \
59+
pgsql \
60+
zip \
61+
&& docker-php-ext-enable \
62+
imagick
6063

6164
#
6265
# CRON
6366
#
6467

6568
RUN mkdir -m 0644 -p /etc/cron.d \
66-
&& mkdir -m 0644 -p /var/log/cron \
67-
&& touch /var/log/cron/cron.log
69+
&& mkdir -m 0644 -p /var/log/cron \
70+
&& touch /var/log/cron/cron.log
6871

6972
#
7073
# COMPOSER
7174
#
7275

7376
RUN curl -sS https://getcomposer.org/installer | php \
74-
&& mv composer.phar /usr/local/bin/composer \
75-
&& composer self-update
77+
&& mv composer.phar /usr/local/bin/composer \
78+
&& composer self-update
7679

7780
#
7881
# NGINX
7982
#
8083

81-
ENV NGINX_VERSION 1.22.1
82-
ENV NJS_VERSION 0.7.7
84+
ENV NGINX_VERSION 1.24.0
85+
ENV NJS_VERSION 0.7.12
8386
ENV PKG_RELEASE 1
8487

8588
RUN set -x \
@@ -101,9 +104,9 @@ RUN set -x \
101104
x86_64|aarch64) \
102105
# arches officially built by upstream
103106
set -x \
104-
&& KEY_SHA512="e7fa8303923d9b95db37a77ad46c68fd4755ff935d0a534d26eba83de193c76166c68bfe7f65471bf8881004ef4aa6df3e34689c305662750c0172fca5d8552a *stdin" \
107+
&& KEY_SHA512="e09fa32f0a0eab2b879ccbbc4d0e4fb9751486eedda75e35fac65802cc9faa266425edf83e261137a2f4d16281ce2c1a5f4502930fe75154723da014214f0655" \
105108
&& wget -O /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub \
106-
&& if [ "$(openssl rsa -pubin -in /tmp/nginx_signing.rsa.pub -text -noout | openssl sha512 -r)" = "$KEY_SHA512" ]; then \
109+
&& if echo "$KEY_SHA512 */tmp/nginx_signing.rsa.pub" | sha512sum -c -; then \
107110
echo "key verification succeeded!"; \
108111
mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \
109112
else \
@@ -138,7 +141,7 @@ RUN set -x \
138141
export HOME=${tempDir} \
139142
&& cd ${tempDir} \
140143
&& curl -f -O https://hg.nginx.org/pkg-oss/archive/${NGINX_VERSION}-${PKG_RELEASE}.tar.gz \
141-
&& PKGOSSCHECKSUM=\"7266f418dcc9d89a2990f504d99ec58d10febbaf078c03630d42843955cee7e50b0f90fb317360384a32473839dc42d8b329b737015ec8dd0d028f90d4d5ed25 *${NGINX_VERSION}-${PKG_RELEASE}.tar.gz\" \
144+
&& PKGOSSCHECKSUM=\"dc47dbaeb1c0874b264d34ddfec40e7d2b814e7db48d144e12d5991c743ef5fcf780ecbab72324e562dd84bb9c0e4dd71d14850b20ceaf470c46f8fe7510275b *${NGINX_VERSION}-${PKG_RELEASE}.tar.gz\" \
142145
&& if [ \"\$(openssl sha512 -r ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz)\" = \"\$PKGOSSCHECKSUM\" ]; then \
143146
echo \"pkg-oss tarball checksum verification succeeded!\"; \
144147
else \
@@ -183,7 +186,7 @@ RUN set -x \
183186
# Bring in tzdata so users could set the timezones through the environment
184187
# variables
185188
&& apk add --no-cache tzdata \
186-
# Bring in curl and ca-certificates to make registering on DNS SD easier
189+
# Bring in curl and ca-certificates to make registering on DNS SD easier
187190
&& apk add --no-cache curl ca-certificates \
188191
# forward request and error logs to docker log collector
189192
&& ln -sf /dev/stdout /var/log/nginx/access.log \

0 commit comments

Comments
 (0)