diff --git a/.github/workflows/sanitizers.yaml b/.github/workflows/sanitizers.yaml index 8def2f18be..c4ade4a6a3 100644 --- a/.github/workflows/sanitizers.yaml +++ b/.github/workflows/sanitizers.yaml @@ -13,6 +13,8 @@ on: - "docs/**" permissions: contents: read +env: + GOTOOLCHAIN: local jobs: # Adapted from https://github.com/beberlei/hdrhistogram-php sanitizers: diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml index 39adb5d949..e4256f06f8 100644 --- a/.github/workflows/static.yaml +++ b/.github/workflows/static.yaml @@ -29,6 +29,7 @@ permissions: attestations: write env: IMAGE_NAME: ${{ (github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.version) || startsWith(github.ref, 'refs/tags/')) && 'dunglas/frankenphp' || 'dunglas/frankenphp-dev' }} + GOTOOLCHAIN: local jobs: prepare: runs-on: ubuntu-24.04 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 99749f6d5f..c45d26effc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -13,6 +13,8 @@ on: - "docs/**" permissions: contents: read +env: + GOTOOLCHAIN: local jobs: tests-linux: name: Tests (Linux, PHP ${{ matrix.php-versions }}) diff --git a/Dockerfile b/Dockerfile index 8ca6543b92..f738c280f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,6 +57,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] COPY --from=golang-base /usr/local/go /usr/local/go ENV PATH=/usr/local/go/bin:$PATH +ENV GOTOOLCHAIN=local # This is required to link the FrankenPHP binary to the PHP binary RUN apt-get update && \ diff --git a/alpine.Dockerfile b/alpine.Dockerfile index 89868b8ec1..c75aa80bf5 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -57,6 +57,7 @@ SHELL ["/bin/ash", "-eo", "pipefail", "-c"] COPY --link --from=golang-base /usr/local/go /usr/local/go ENV PATH=/usr/local/go/bin:$PATH +ENV GOTOOLCHAIN=local # hadolint ignore=SC2086 RUN apk add --no-cache --virtual .build-deps \ diff --git a/caddy/caddy.go b/caddy/caddy.go index 5a54ca8e85..f8169c988d 100644 --- a/caddy/caddy.go +++ b/caddy/caddy.go @@ -343,7 +343,7 @@ func (f *FrankenPHPApp) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { } if f.MaxThreads > 0 && f.NumThreads > 0 && f.MaxThreads < f.NumThreads { - return errors.New("'max_threads' must be greater than or equal to 'num_threads'") + return errors.New(`"max_threads"" must be greater than or equal to "num_threads"`) } return nil diff --git a/caddy/go.mod b/caddy/go.mod index c902443c5b..a9e7c7f19b 100644 --- a/caddy/go.mod +++ b/caddy/go.mod @@ -2,8 +2,6 @@ module github.com/dunglas/frankenphp/caddy go 1.24.0 -toolchain go1.24.2 - replace github.com/dunglas/frankenphp => ../ retract v1.0.0-rc.1 // Human error diff --git a/dev-alpine.Dockerfile b/dev-alpine.Dockerfile index e5f35f2ec8..7a95498288 100644 --- a/dev-alpine.Dockerfile +++ b/dev-alpine.Dockerfile @@ -3,6 +3,7 @@ #checkov:skip=CKV_DOCKER_3 FROM golang:1.24-alpine +ENV GOTOOLCHAIN=local ENV CFLAGS="-ggdb3" ENV PHPIZE_DEPS="\ autoconf \ diff --git a/dev.Dockerfile b/dev.Dockerfile index 8a5e7f46d1..615d01223d 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -3,6 +3,7 @@ #checkov:skip=CKV_DOCKER_3 FROM golang:1.24 +ENV GOTOOLCHAIN=local ENV CFLAGS="-ggdb3" ENV PHPIZE_DEPS="\ autoconf \ diff --git a/go.mod b/go.mod index 77bf57cab6..da88964678 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/dunglas/frankenphp -go 1.24 +go 1.24.0 retract v1.0.0-rc.1 // Human error diff --git a/static-builder-gnu.Dockerfile b/static-builder-gnu.Dockerfile index 1575817fa2..7fa40d5cec 100644 --- a/static-builder-gnu.Dockerfile +++ b/static-builder-gnu.Dockerfile @@ -22,7 +22,8 @@ ARG MIMALLOC='' ARG NO_COMPRESS='' # go version -ENV GO_VERSION=1.24.1 +ENV GOTOOLCHAIN=local +ENV GO_VERSION=1.24.3 # labels, same as static-builder.Dockerfile LABEL org.opencontainers.image.title=FrankenPHP @@ -94,9 +95,8 @@ RUN yum install -y \ else \ GO_ARCH="amd64" ; \ fi ; \ - curl -o jq -fsSL https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-${GO_ARCH} && \ - chmod +x jq && \ - mv jq /usr/local/bin/jq && \ + curl -o /usr/local/bin/jq -fsSL https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-${GO_ARCH} && \ + chmod +x /usr/local/bin/jq && \ curl -o go.tgz -fsSL https://go.dev/dl/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz && \ rm -rf /usr/local/go && \ tar -C /usr/local -xzf go.tgz && \ @@ -105,7 +105,7 @@ RUN yum install -y \ ENV PATH="/cmake/bin:/usr/local/go/bin:$PATH" -# Apply gnu mode +# Apply GNU mode ENV CC='/opt/rh/devtoolset-10/root/usr/bin/gcc' ENV CXX='/opt/rh/devtoolset-10/root/usr/bin/g++' ENV AR='/opt/rh/devtoolset-10/root/usr/bin/ar' @@ -127,6 +127,7 @@ RUN go mod download WORKDIR /go/src/app/caddy COPY caddy/go.mod caddy/go.sum ./ +RUN go mod download WORKDIR /go/src/app COPY --link *.* ./ diff --git a/static-builder-musl.Dockerfile b/static-builder-musl.Dockerfile index a9ba2cda9e..b2e7bb621c 100644 --- a/static-builder-musl.Dockerfile +++ b/static-builder-musl.Dockerfile @@ -21,6 +21,8 @@ ARG DEBUG_SYMBOLS='' ARG MIMALLOC='' ARG NO_COMPRESS='' +ENV GOTOOLCHAIN=local + SHELL ["/bin/ash", "-eo", "pipefail", "-c"] LABEL org.opencontainers.image.title=FrankenPHP