diff --git a/Dockerfile b/Dockerfile index 39307965..66674c2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,12 @@ ARG TARGET_GOOS ARG TARGET_GOARCH FROM golang:1.22.5 as builder ENV GO111MODULE=on \ - CGO_ENABLED=0 \ - TARGET_GOOS=${TARGET_GOOS} \ - TARGET_GOARCH=${TARGET_GOARCH} \ - CONTAINER_BUILD=1 + CGO_ENABLED=0 \ + TARGET_GOOS=${TARGET_GOOS} \ + TARGET_GOARCH=${TARGET_GOARCH} \ + # the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual + # which changes how cloudflared binds the metrics server + CONTAINER_BUILD=1 WORKDIR /go/src/github.com/cloudflare/cloudflared/ diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index d1cdbcbf..c375d801 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -1,7 +1,10 @@ # use a builder image for building cloudflare FROM golang:1.22.5 as builder ENV GO111MODULE=on \ - CGO_ENABLED=0 + CGO_ENABLED=0 \ + # the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual + # which changes how cloudflared binds the metrics server + CONTAINER_BUILD=1 WORKDIR /go/src/github.com/cloudflare/cloudflared/ diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 0190bf63..b617d7ae 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -1,7 +1,10 @@ # use a builder image for building cloudflare FROM golang:1.22.5 as builder ENV GO111MODULE=on \ - CGO_ENABLED=0 + CGO_ENABLED=0 \ + # the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual + # which changes how cloudflared binds the metrics server + CONTAINER_BUILD=1 WORKDIR /go/src/github.com/cloudflare/cloudflared/