Skip to content

Commit 6f87b5e

Browse files
committed
PHP: replace swoole with frankenphp (for octane)
1 parent 7f3556d commit 6f87b5e

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

php-base/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,17 @@ ARG PHP_VERSION="84"
6565
# Install packages
6666
# hadolint ignore=DL3018
6767
RUN apk add --no-cache \
68-
php${PHP_VERSION}-pecl-swoole \
69-
php${PHP_VERSION}-posix
68+
curl \
69+
php${PHP_VERSION}-posix \
70+
&& case "${TARGETARCH:-arm64}" in \
71+
amd64) FRANKEN_ARCH="x86_64" ;; \
72+
arm64) FRANKEN_ARCH="aarch64" ;; \
73+
*) echo "Unsupported architecture: $TARGETARCH"; exit 1 ;; \
74+
esac \
75+
&& curl -fsSL -o /usr/local/bin/frankenphp \
76+
"https://github.com/php/frankenphp/releases/latest/download/frankenphp-linux-${FRANKEN_ARCH}" \
77+
&& apk del curl \
78+
&& chmod +x /usr/local/bin/frankenphp
7079

7180
# Copy configuration files
7281
COPY config/nginx/http.d/default-octane.conf /etc/nginx/http.d/default.conf

php-base/config/s6-overlay/php-octane/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ s6-envdir -I /secrets
66
importas -D "" PWD PWD
77
execline-cd $PWD
88
export LARAVEL_OCTANE 1
9-
php /app/www/artisan octane:start --server=swoole --host=0.0.0.0 --port=3000 --workers=1 --task-workers=0
9+
php /app/www/artisan octane:start --server=frankenphp --host=0.0.0.0 --port=3000 --workers=1 --task-workers=0

0 commit comments

Comments
 (0)