22 lines
No EOL
714 B
Docker
22 lines
No EOL
714 B
Docker
FROM dunglas/frankenphp:builder AS builder
|
|
|
|
COPY --from=caddy:builder /usr/bin/xcaddy /usr/bin/xcaddy
|
|
|
|
RUN CGO_ENABLED=1 \
|
|
XCADDY_SETCAP=1 \
|
|
XCADDY_GO_BUILD_FLAGS="-ldflags='-w -s' -tags=nobadger,nomysql,nopgx" \
|
|
CGO_CFLAGS=$(php-config --includes) \
|
|
CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" \
|
|
xcaddy build \
|
|
--output /usr/local/bin/frankenphp \
|
|
--with github.com/dunglas/frankenphp=./ \
|
|
--with github.com/dunglas/frankenphp/caddy=./caddy/
|
|
# --with github.com/dunglas/caddy-cbrotli
|
|
# Add extra Caddy modules here
|
|
|
|
FROM dunglas/frankenphp AS runner
|
|
|
|
COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp
|
|
|
|
|
|
# $XCADDY_CMD |