Skip to content

Commit

Permalink
Frankenphp use the lphp file now
Browse files Browse the repository at this point in the history
  • Loading branch information
en-jschuetze committed Jan 14, 2025
1 parent 85d1778 commit 248fc76
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,17 @@ RUN apk add --no-cache binutils build-base openssl-dev autoconf pcre2-dev automa

FROM php-zts-base AS FRANKENPHPBUILDER

# Install e-dant/watcher (necessary for file watching)
RUN mkdir -p /usr/local/src/watcher
WORKDIR /usr/local/src/watcher
RUN apk add --no-cache binutils build-base cmake automake libtool linux-headers --virtual .watcher-build-deps \
&& wget --quiet --no-verbose https://github.com/e-dant/watcher/archive/refs/tags/0.13.2.tar.gz -O /tmp/watcher.tar.gz \
&& tar xz --strip-component=1 -xf /tmp/watcher.tar.gz \
&& cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
&& cmake --build build \
&& cmake --install build \
&& apk del --no-network .watcher-build-deps

# install caddy with frankenphp
# hadolint ignore=SC2016,SC2086,DL3003
RUN apk add --no-cache go~=1.23 --virtual .go-build-deps \
Expand All @@ -299,7 +310,7 @@ RUN apk add --no-cache go~=1.23 --virtual .go-build-deps \
&& sed -i -e "s/lphp/l${PHP_PACKAGE_BASENAME}/g" ../../frankenphp.go \
&& export PHP_CFLAGS="-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 `php-config --includes`" \
&& export PHP_CPPFLAGS="$PHP_CFLAGS" \
&& export PHP_LDFLAGS="-Wl,-O1 -pie `php-config --ldflags`" \
&& export PHP_LDFLAGS="-Wl,-O1 -pie `php-config --ldflags` `php-config --libs`" \
&& export CGO_LDFLAGS="$PHP_LDFLAGS" CGO_CFLAGS=$PHP_CFLAGS CGO_CPPFLAGS=$PHP_CPPFLAGS \
&& go build \
&& rm -rf /root/.cache /root/go \
Expand Down

0 comments on commit 248fc76

Please sign in to comment.