@@ -66,12 +66,12 @@ ENV GOTOOLCHAIN=local
6666RUN apk add --no-cache --virtual .build-deps \
6767 $PHPIZE_DEPS \
6868 argon2-dev \
69- # Needed for the custom Go build
69+ # Needed for the custom Go build \
7070 bash \
7171 brotli-dev \
7272 coreutils \
7373 curl-dev \
74- # Needed for the custom Go build
74+ # Needed for the custom Go build \
7575 git \
7676 gnu-libiconv-dev \
7777 libsodium-dev \
@@ -89,20 +89,20 @@ RUN apk add --no-cache --virtual .build-deps \
8989# Install e-dant/watcher (necessary for file watching)
9090WORKDIR /usr/local/src/watcher
9191RUN --mount=type=secret,id=github-token \
92- if [ -f /run/secrets/github-token ] && [ -s /run/secrets/github-token ]; then \
93- curl -s -H "Authorization: Bearer $(cat /run/secrets/github-token)" https://api.github.com/repos/e-dant/watcher/releases/latest; \
94- else \
95- curl -s https://api.github.com/repos/e-dant/watcher/releases/latest; \
96- fi | \
97- grep tarball_url | \
98- awk '{ print $2 }' | \
99- sed 's/,$//' | \
100- sed 's/"//g' | \
101- xargs curl -L | \
102- tar xz --strip-components 1 && \
103- cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && \
104- cmake --build build && \
105- cmake --install build
92+ if [ -f /run/secrets/github-token ] && [ -s /run/secrets/github-token ]; then \
93+ curl -s -H "Authorization: Bearer $(cat /run/secrets/github-token)" https://api.github.com/repos/e-dant/watcher/releases/latest; \
94+ else \
95+ curl -s https://api.github.com/repos/e-dant/watcher/releases/latest; \
96+ fi | \
97+ grep tarball_url | \
98+ awk '{ print $2 }' | \
99+ sed 's/,$//' | \
100+ sed 's/"//g' | \
101+ xargs curl -L | \
102+ tar xz --strip-components 1 && \
103+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && \
104+ cmake --build build && \
105+ cmake --install build
106106
107107WORKDIR /go/src/app
108108
@@ -123,7 +123,7 @@ ENV CGO_LDFLAGS="-lssl -lcrypto -lreadline -largon2 -lcurl -lonig -lz $PHP_LDFLA
123123
124124WORKDIR /go/src/app/caddy/frankenphp
125125RUN GOBIN=/usr/local/bin \
126- ../../go.sh install -ldflags "-w -s -extldflags '-Wl,-z,stack-size=0x80000' -X 'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP $FRANKENPHP_VERSION PHP $PHP_VERSION Caddy'" -buildvcs=true && \
126+ ../../go.sh install -ldflags "-w -s -extldflags '-Wl,-z,stack-size=0x80000' -X 'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP $FRANKENPHP_VERSION PHP $PHP_VERSION Caddy'" -buildvcs=true && \
127127 setcap cap_net_bind_service=+ep /usr/local/bin/frankenphp && \
128128 ([ -z "${NO_COMPRESS}" ] && upx --best /usr/local/bin/frankenphp || true) && \
129129 frankenphp version && \
0 commit comments