1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- # syntax=docker/dockerfile:1
- FROM golang:1.21-alpine
- ENV CFLAGS="-ggdb3"
- ENV PHPIZE_DEPS \
- autoconf \
- dpkg-dev \
- file \
- g++ \
- gcc \
- libc-dev \
- make \
- pkgconfig \
- re2c
- RUN apk add --no-cache \
- $PHPIZE_DEPS \
- argon2-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
- 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 . .
- WORKDIR /go/src/app/caddy/frankenphp
- RUN go build
- WORKDIR /go/src/app
- CMD [ "zsh" ]
|