Update Dockerfile
This commit is contained in:
parent
a9a9c7422b
commit
02afdd266e
1 changed files with 19 additions and 4 deletions
23
Dockerfile
23
Dockerfile
|
@ -1,7 +1,22 @@
|
|||
FROM caddy:builder AS builder
|
||||
FROM dunglas/frankenphp:builder AS builder
|
||||
|
||||
RUN $XCADDY_CMD
|
||||
COPY --from=caddy:builder /usr/bin/xcaddy /usr/bin/xcaddy
|
||||
|
||||
FROM caddy:latest
|
||||
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
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
FROM dunglas/frankenphp AS runner
|
||||
|
||||
COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp
|
||||
|
||||
|
||||
# $XCADDY_CMD
|
Loading…
Add table
Add a link
Reference in a new issue