Skip to content

Commit cd10760

Browse files
Initial PHP 8.2 rc1 support
1 parent c88bf01 commit cd10760

18 files changed

+618
-6
lines changed

Diff for: .github/workflows/docker-image.yml

+35
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,38 @@ jobs:
106106
env:
107107
SHA: ${{ steps.short-sha.outputs.sha }}
108108
BRANCH: ${{ steps.extract_branch.outputs.branch }}
109+
110+
111+
php82:
112+
113+
runs-on: ubuntu-latest
114+
115+
steps:
116+
- uses: actions/checkout@v3
117+
118+
- uses: benjlevesque/[email protected]
119+
id: short-sha
120+
with:
121+
length: 6
122+
123+
- name: Extract branch name
124+
shell: bash
125+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
126+
id: extract_branch
127+
128+
- name: Set up Docker Buildx
129+
id: buildx
130+
uses: docker/setup-buildx-action@v2
131+
132+
-
133+
name: Login to Docker Hub
134+
uses: docker/login-action@v2
135+
with:
136+
username: ${{ secrets.DOCKERHUB_USERNAME }}
137+
password: ${{ secrets.DOCKERHUB_TOKEN }}
138+
139+
- name: Build the Docker image
140+
run: ./build/build-8.2.sh
141+
env:
142+
SHA: ${{ steps.short-sha.outputs.sha }}
143+
BRANCH: ${{ steps.extract_branch.outputs.branch }}

Diff for: README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# k8s-openresty-php
22

3-
> A set of relatively clean but full-featured, split solution to running openresty and php-fpm together but in seperate containers, supporting PHP versions 5.6, 7.1, 7.2, 7.3, 7.4, 8.0, and 8.1 maintained by [Parallax](https://parall.ax/)
3+
> A set of relatively clean but full-featured, split solution to running openresty and php-fpm together but in seperate containers, supporting PHP versions 5.6, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1 and 8.2 maintained by [Parallax](https://parall.ax/)
44
55
## Docker Tags
66
|openresty | Docker tag |
@@ -16,6 +16,7 @@
1616
| 7.4 | prlx/k8s-openresty-php-php:release-php-7.4-latest |
1717
| 8.0 | prlx/k8s-openresty-php-php:release-php-8.0-latest |
1818
| 8.1 | prlx/k8s-openresty-php-php:release-php-8.1-latest |
19+
| 8.2 | prlx/k8s-openresty-php-php:release-php-8.2-latest |
1920

2021
## Browse all tags on Docker Hub
2122
[Openresty](https://hub.docker.com/r/prlx/k8s-openresty-php-openresty)

Diff for: README.md.template

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# k8s-openresty-php
22

3-
> A set of relatively clean but full-featured, split solution to running openresty and php-fpm together but in seperate containers, supporting PHP versions 5.6, 7.1, 7.2, 7.3, 7.4, 8.0, and 8.1 maintained by [Parallax](https://parall.ax/)
3+
> A set of relatively clean but full-featured, split solution to running openresty and php-fpm together but in seperate containers, supporting PHP versions 5.6, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1 and 8.2 maintained by [Parallax](https://parall.ax/)
44

55
## Docker Tags
66
|openresty | Docker tag |
@@ -16,6 +16,7 @@
1616
| 7.4 | prlx/k8s-openresty-php-php:release-php-7.4-latest |
1717
| 8.0 | prlx/k8s-openresty-php-php:release-php-8.0-latest |
1818
| 8.1 | prlx/k8s-openresty-php-php:release-php-8.1-latest |
19+
| 8.2 | prlx/k8s-openresty-php-php:release-php-8.2-latest |
1920

2021
## Browse all tags on Docker Hub
2122
[Openresty](https://hub.docker.com/r/prlx/k8s-openresty-php-openresty)
@@ -216,4 +217,4 @@ The worker will run php artisan queue:work --timeout=$WORKER_TIMEOUT --tries=$WO
216217
To run in this mode, change the Docker CMD to be /start-worker.sh instead of the default /start-web.sh.
217218

218219
# PHP Modules
219-
{{ MODULES_TABLE }}
220+
{{ MODULES_TABLE }}

Diff for: build/build-8.2.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
docker buildx build --push --platform=linux/arm64/v8,linux/amd64 -t prlx/k8s-openresty-php-php:build-$SHA-php-8.2 -f php/Dockerfile-8.2 .
3+
4+
if [ "$BRANCH" == 'master' ]; then
5+
docker buildx build --push --platform=linux/arm64/v8,linux/amd64 -t prlx/k8s-openresty-php-php:release-php-8.2-latest -f php/Dockerfile-8.2 .
6+
fi

Diff for: build/build-test-image-8.2.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
BUILDNUMBER=$bamboo_buildNumber
3+
4+
sed -i -e "s#{{ BUILDNUMBER }}#$BUILDNUMBER#g" test/Dockerfile-8.2
5+
docker build -t prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-8.2-test -f test/Dockerfile-8.2 .

Diff for: build/build-yaml.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ sed -i -e "s#{{ OPENRESTYIMAGEHERE }}#prlx/k8s-openresty-php-openresty:build-$BU
1515
sed -i -e "s#{{ OPENRESTYIMAGEHERE }}#prlx/k8s-openresty-php-openresty:build-$BUILDNUMBER#g" yaml-deploy/deployment-7.4.yaml
1616
sed -i -e "s#{{ OPENRESTYIMAGEHERE }}#prlx/k8s-openresty-php-openresty:build-$BUILDNUMBER#g" yaml-deploy/deployment-8.0.yaml
1717
sed -i -e "s#{{ OPENRESTYIMAGEHERE }}#prlx/k8s-openresty-php-openresty:build-$BUILDNUMBER#g" yaml-deploy/deployment-8.1.yaml
18+
sed -i -e "s#{{ OPENRESTYIMAGEHERE }}#prlx/k8s-openresty-php-openresty:build-$BUILDNUMBER#g" yaml-deploy/deployment-8.2.yaml
1819
sed -i -e "s#{{ PHP5.6IMAGEHERE }}#prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-5.6-test#g" yaml-deploy/deployment-5.6.yaml
1920
sed -i -e "s#{{ PHP7.1IMAGEHERE }}#prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-7.1-test#g" yaml-deploy/deployment-7.1.yaml
2021
sed -i -e "s#{{ PHP7.2IMAGEHERE }}#prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-7.2-test#g" yaml-deploy/deployment-7.2.yaml
2122
sed -i -e "s#{{ PHP7.3IMAGEHERE }}#prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-7.3-test#g" yaml-deploy/deployment-7.3.yaml
2223
sed -i -e "s#{{ PHP7.4IMAGEHERE }}#prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-7.4-test#g" yaml-deploy/deployment-7.4.yaml
2324
sed -i -e "s#{{ PHP8.0IMAGEHERE }}#prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-8.0-test#g" yaml-deploy/deployment-8.0.yaml
24-
sed -i -e "s#{{ PHP8.1IMAGEHERE }}#prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-8.1-test#g" yaml-deploy/deployment-8.1.yaml
25+
sed -i -e "s#{{ PHP8.1IMAGEHERE }}#prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-8.1-test#g" yaml-deploy/deployment-8.1.yaml
26+
sed -i -e "s#{{ PHP8.2IMAGEHERE }}#prlx/k8s-openresty-php-php:build-$BUILDNUMBER-php-8.2-test#g" yaml-deploy/deployment-8.2.yaml

Diff for: build/deploy-8.2.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# Apply to Kubernetes
3+
kubectl --kubeconfig=$KUBERNETESCONFIG apply -f yaml-deploy/namespace.yaml
4+
kubectl --kubeconfig=$KUBERNETESCONFIG apply -f yaml-deploy/deployment-8.2.yaml
5+
kubectl --kubeconfig=$KUBERNETESCONFIG apply -f yaml-deploy/service-8.2.yaml
6+
kubectl --kubeconfig=$KUBERNETESCONFIG apply -f yaml-deploy/ingress-8.2.yaml
7+
kubectl --kubeconfig=$KUBERNETESCONFIG apply -f yaml-deploy/certificate-8.2.yaml

Diff for: php/Dockerfile-8.2

+195
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
FROM alpine:3.16
2+
3+
ARG ATATUS_VERSION=1.14.0
4+
ARG ATATUS_ENABLED=TRUE
5+
6+
ENV \
7+
# When using Composer, disable the warning about running commands as root/super user
8+
COMPOSER_ALLOW_SUPERUSER=1 \
9+
# Persistent runtime dependencies
10+
DEPS="php82 \
11+
php82-common \
12+
php82-curl \
13+
php82-dom \
14+
php82-exif \
15+
php82-fileinfo \
16+
php82-ftp \
17+
php82-gd \
18+
php82-iconv \
19+
php82-mysqli \
20+
php82-openssl \
21+
php82-pdo \
22+
php82-posix \
23+
php82-soap \
24+
php82-zip \
25+
php82-ldap \
26+
php82-bcmath \
27+
php82-calendar \
28+
php82-gettext \
29+
php82-mbstring \
30+
php82-pcntl \
31+
php82-phar \
32+
php82-simplexml \
33+
php82-sockets \
34+
php82-tokenizer \
35+
php82-xmlreader \
36+
php82-zip \
37+
php82-zlib \
38+
php82-xsl \
39+
php82-opcache \
40+
php82-ctype \
41+
php82-pdo_mysql \
42+
php82-pdo_sqlite \
43+
php82-sqlite3 \
44+
php82-intl \
45+
php82-fpm \
46+
php82-mysqli \
47+
php82-sodium \
48+
curl \
49+
ca-certificates \
50+
supervisor \
51+
bash \
52+
tzdata \
53+
openssl \
54+
wget \
55+
curl \
56+
bash"
57+
58+
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
59+
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories
60+
61+
# Install deps
62+
RUN apk add --no-cache \
63+
curl \
64+
ca-certificates \
65+
supervisor \
66+
bash \
67+
tzdata \
68+
openssl \
69+
wget \
70+
curl \
71+
bash \
72+
fcgi \
73+
nano \
74+
tidyhtml \
75+
php82 \
76+
php82-pecl-apcu \
77+
php82-bz2 \
78+
php82-common \
79+
php82-curl \
80+
php82-dom \
81+
php82-exif \
82+
php82-fileinfo \
83+
php82-ftp \
84+
php82-gd \
85+
php82-iconv \
86+
# php82-pecl-imagick \
87+
php82-mbstring \
88+
php82-mysqli \
89+
php82-openssl \
90+
php82-pdo \
91+
php82-posix \
92+
php82-soap \
93+
php82-session \
94+
php82-redis \
95+
php82-zip \
96+
php82-ldap \
97+
php82-bcmath \
98+
php82-calendar \
99+
php82-gettext \
100+
php82-pcntl \
101+
php82-phar \
102+
php82-simplexml \
103+
php82-shmop \
104+
php82-sysvmsg \
105+
php82-sysvsem \
106+
php82-sysvshm \
107+
php82-sockets \
108+
php82-tidy \
109+
php82-tokenizer \
110+
php82-xmlreader \
111+
php82-zip \
112+
php82-zlib \
113+
php82-xsl \
114+
php82-xml \
115+
php82-xmlwriter \
116+
php82-opcache \
117+
php82-ctype \
118+
php82-pdo_mysql \
119+
php82-pdo_sqlite \
120+
php82-sqlite3 \
121+
php82-intl \
122+
php82-fpm \
123+
php82-mysqli \
124+
php82-sodium && \
125+
126+
ln -snf /usr/bin/php82 /usr/bin/php && \
127+
ln -snf /usr/sbin/php-fpm82 /usr/sbin/php-fpm && \
128+
129+
# Symlink current version
130+
mkdir /etc/php && \
131+
ln -snf /etc/php82 /etc/php/current;
132+
133+
# Composer
134+
RUN EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)" && \
135+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
136+
ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" && \
137+
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]; \
138+
then \
139+
>&2 echo 'ERROR: Invalid installer signature' \
140+
rm composer-setup.php \
141+
exit 1; \
142+
fi && \
143+
php composer-setup.php --quiet --install-dir=/usr/local/bin --filename=composer && \
144+
RESULT=$? && \
145+
rm composer-setup.php && \
146+
exit $RESULT
147+
148+
#RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
149+
# && architecture=$(case $(uname -m) in i386 | i686 | x86) echo "i386" ;; x86_64 | amd64) echo "amd64" ;; aarch64 | arm64 | armv8) echo "arm64" ;; *) echo "amd64" ;; esac) \
150+
# && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/alpine/$architecture/$version \
151+
# && mkdir -p /tmp/blackfire \
152+
# && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
153+
# && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
154+
# && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
155+
156+
#RUN if [ "$ATATUS_ENABLED" == "TRUE" ]; then \
157+
# # Atatus
158+
# architecture=$(case $(uname -m) in i386 | i686 | x86) echo "i386" ;; x86_64 | amd64) echo "x64" ;; aarch64 | arm64 | armv8) echo "arm64" ;; *) echo "x64" ;; esac) && \
159+
# wget https://s3.amazonaws.com/atatus-artifacts/atatus-php/downloads/atatus-php-$ATATUS_VERSION-$architecture-musl.tar.gz && tar -xzvf atatus-php-$ATATUS_VERSION-$architecture-musl.tar.gz && cd atatus-php-$ATATUS_VERSION-$architecture-musl && ./install.sh && rm -f /atatus-php-$ATATUS_VERSION-$architecture-musl.tar.gz && rm -rf /atatus-php-$ATATUS_VERSION-$architecture-musl && \
160+
# sed -i -e 's#atatus.trace.response_time = 2000#atatus.trace.response_time = 1500#g' /etc/php/current/conf.d/atatus.ini && \
161+
# sed -i -e 's#atatus.collector.pidfile = "/var/run/atatus-php-collector.pid"#atatus.collector.pidfile = "/run/atatus-php-collector.pid"#g' /etc/php/current/conf.d/atatus.ini && \
162+
# sed -i -e 's#atatus.collector.connection = "/tmp/.atatus.sock"#atatus.collector.connection = "/run/atatus.sock"#g' /etc/php/current/conf.d/atatus.ini && \
163+
# # Write log files to stdout
164+
# rm -f /var/log/atatus/agent.log && rm -f /var/log/atatus/collector.log && rm -f /var/log/atatus/debug.txt && ln -sf /dev/null /var/log/atatus/agent.log && ln -sf /dev/null /var/log/atatus/collector.log && ln -sf /dev/null /var/log/atatus/debug.txt; \
165+
# fi
166+
167+
# PHP Config
168+
ADD /php/conf/php-fpm.conf /etc/php/current/php-fpm.conf
169+
ADD /php/conf/php.ini /etc/php/current/php.ini
170+
ADD /php/conf/php-www.conf /etc/php/current/php-fpm.d/www.conf
171+
172+
# Clear out garbage
173+
RUN unset DEPS && rm -rf /run/php && rm -rf /run/php-fpm8.2
174+
175+
# Start script
176+
ADD /php/scripts/start.sh /start.sh
177+
RUN chmod +x /start.sh
178+
179+
# Start cron script
180+
ADD /php/scripts/start-cron.sh /start-cron.sh
181+
RUN chmod +x /start-cron.sh
182+
183+
# Start worker script
184+
ADD /php/scripts/start-worker.sh /start-worker.sh
185+
RUN chmod +x /start-worker.sh
186+
187+
# Configure script
188+
ADD /php/scripts/configure.sh /configure.sh
189+
RUN chmod +x /configure.sh
190+
191+
# Healthcheck script
192+
ADD /php/scripts/healthcheck.sh /healthcheck.sh
193+
RUN chmod +x /healthcheck.sh
194+
195+
CMD ["/start.sh"]

Diff for: test/Dockerfile-8.2

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM prlx/k8s-openresty-php-php:build-{{ BUILDNUMBER }}-php-8.2
2+
3+
ADD test/public /src/public

Diff for: test/modules/GenerateModuleList.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
$phpVersions = ['5.6', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'];
3+
$phpVersions = ['5.6', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'];
44

55
foreach($phpVersions as $phpVersion) {
66
$modules = `docker run -it prlx/k8s-openresty-php-php:build--php-$phpVersion php -m`;
77
file_put_contents(__DIR__.'/moduleList/'.$phpVersion.'.list', $modules);
8-
}
8+
}

Diff for: test/modules/README.md

Whitespace-only changes.

Diff for: test/modules/moduleList/8.2.list

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
PHP Warning: PHP Startup: Unable to load dynamic library 'zip' (tried: /usr/lib/php82/modules/zip (Error loading shared library /usr/lib/php82/modules/zip: No such file or directory), /usr/lib/php82/modules/zip.so (Error relocating /usr/lib/php82/modules/zip.so: zip_file_is_seekable: symbol not found)) in Unknown on line 0
2+
[PHP Modules]
3+
apcu
4+
bcmath
5+
bz2
6+
calendar
7+
Core
8+
ctype
9+
curl
10+
date
11+
dom
12+
exif
13+
fileinfo
14+
filter
15+
ftp
16+
gd
17+
gettext
18+
hash
19+
iconv
20+
igbinary
21+
intl
22+
json
23+
ldap
24+
libxml
25+
mbstring
26+
mysqli
27+
mysqlnd
28+
openssl
29+
pcntl
30+
pcre
31+
PDO
32+
pdo_mysql
33+
pdo_sqlite
34+
Phar
35+
posix
36+
random
37+
readline
38+
redis
39+
Reflection
40+
session
41+
shmop
42+
SimpleXML
43+
soap
44+
sockets
45+
sodium
46+
SPL
47+
sqlite3
48+
standard
49+
sysvmsg
50+
sysvsem
51+
sysvshm
52+
tidy
53+
tokenizer
54+
xml
55+
xmlreader
56+
xmlwriter
57+
xsl
58+
Zend OPcache
59+
zlib
60+
61+
[Zend Modules]
62+
Zend OPcache
63+

0 commit comments

Comments
 (0)