frankenphp/dev-alpine.Dockerfile

69 lines
1.3 KiB
Docker
Raw Normal View History

# syntax=docker/dockerfile:1
2024-08-04 12:05:54 +00:00
#checkov:skip=CKV_DOCKER_2
#checkov:skip=CKV_DOCKER_3
2024-02-12 09:00:46 +00:00
FROM golang:1.22-alpine
ENV CFLAGS="-ggdb3"
2024-07-05 09:09:09 +00:00
ENV PHPIZE_DEPS="\
autoconf \
dpkg-dev \
file \
g++ \
gcc \
libc-dev \
make \
pkgconfig \
2024-07-05 09:09:09 +00:00
re2c"
RUN apk add --no-cache \
$PHPIZE_DEPS \
argon2-dev \
brotli-dev \
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-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 . && \
# --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
WORKDIR /go/src/app
COPY . .
2023-12-01 16:26:21 +00:00
WORKDIR /go/src/app/caddy/frankenphp
RUN go build
2023-12-01 16:26:21 +00:00
WORKDIR /go/src/app
CMD [ "zsh" ]