2023-09-19 14:44:50 +00:00
|
|
|
# syntax=docker/dockerfile:1
|
2024-02-12 09:00:46 +00:00
|
|
|
FROM golang:1.22-alpine
|
2023-09-19 14:44:50 +00:00
|
|
|
|
|
|
|
ENV CFLAGS="-ggdb3"
|
|
|
|
ENV PHPIZE_DEPS \
|
2024-01-29 13:41:32 +00:00
|
|
|
autoconf \
|
|
|
|
dpkg-dev \
|
|
|
|
file \
|
|
|
|
g++ \
|
|
|
|
gcc \
|
|
|
|
libc-dev \
|
|
|
|
make \
|
|
|
|
pkgconfig \
|
|
|
|
re2c
|
2023-09-19 14:44:50 +00:00
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
2024-01-29 13:41:32 +00:00
|
|
|
$PHPIZE_DEPS \
|
|
|
|
argon2-dev \
|
2024-01-30 17:33:59 +00:00
|
|
|
brotli-dev \
|
2024-01-29 13:41:32 +00:00
|
|
|
curl-dev \
|
|
|
|
oniguruma-dev \
|
|
|
|
readline-dev \
|
|
|
|
libsodium-dev \
|
|
|
|
sqlite-dev \
|
|
|
|
openssl-dev \
|
|
|
|
libxml2-dev \
|
|
|
|
zlib-dev \
|
|
|
|
bison \
|
|
|
|
nss-tools \
|
|
|
|
# Dev tools \
|
|
|
|
git \
|
|
|
|
clang \
|
|
|
|
llvm \
|
|
|
|
gdb \
|
|
|
|
valgrind \
|
|
|
|
neovim \
|
|
|
|
zsh \
|
|
|
|
libtool && \
|
|
|
|
echo 'set auto-load safe-path /' > /root/.gdbinit
|
2023-09-19 14:44:50 +00:00
|
|
|
|
2023-12-01 16:26:21 +00:00
|
|
|
WORKDIR /usr/local/src/php
|
|
|
|
RUN git clone --branch=PHP-8.3 https://github.com/php/php-src.git . && \
|
2024-01-29 13:41:32 +00:00
|
|
|
# --enable-embed is only necessary to generate libphp.so, we don't use this SAPI directly
|
|
|
|
./buildconf --force && \
|
|
|
|
./configure \
|
|
|
|
--enable-embed \
|
|
|
|
--enable-zts \
|
|
|
|
--disable-zend-signals \
|
|
|
|
--enable-zend-max-execution-timers \
|
|
|
|
--enable-debug && \
|
|
|
|
make -j"$(nproc)" && \
|
|
|
|
make install && \
|
|
|
|
ldconfig /etc/ld.so.conf.d && \
|
|
|
|
cp php.ini-development /usr/local/lib/php.ini && \
|
|
|
|
echo "zend_extension=opcache.so" >> /usr/local/lib/php.ini && \
|
|
|
|
echo "opcache.enable=1" >> /usr/local/lib/php.ini && \
|
|
|
|
php --version
|
2023-09-19 14:44:50 +00:00
|
|
|
|
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY . .
|
|
|
|
|
2023-12-01 16:26:21 +00:00
|
|
|
WORKDIR /go/src/app/caddy/frankenphp
|
|
|
|
RUN go build
|
2023-09-19 14:44:50 +00:00
|
|
|
|
2023-12-01 16:26:21 +00:00
|
|
|
WORKDIR /go/src/app
|
2023-09-19 14:44:50 +00:00
|
|
|
CMD [ "zsh" ]
|