TUN-8829: add CONTAINER_BUILD to dockerfiles

Closes TUN-8829
This commit is contained in:
Luis Neto 2024-12-20 08:24:12 -08:00
parent ac57ed9709
commit 2714d10d62
3 changed files with 14 additions and 6 deletions

View File

@ -6,6 +6,8 @@ ENV GO111MODULE=on \
CGO_ENABLED=0 \ CGO_ENABLED=0 \
TARGET_GOOS=${TARGET_GOOS} \ TARGET_GOOS=${TARGET_GOOS} \
TARGET_GOARCH=${TARGET_GOARCH} \ 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 CONTAINER_BUILD=1

View File

@ -1,7 +1,10 @@
# use a builder image for building cloudflare # use a builder image for building cloudflare
FROM golang:1.22.5 as builder FROM golang:1.22.5 as builder
ENV GO111MODULE=on \ 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/ WORKDIR /go/src/github.com/cloudflare/cloudflared/

View File

@ -1,7 +1,10 @@
# use a builder image for building cloudflare # use a builder image for building cloudflare
FROM golang:1.22.5 as builder FROM golang:1.22.5 as builder
ENV GO111MODULE=on \ 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/ WORKDIR /go/src/github.com/cloudflare/cloudflared/