Skip to content

Commit 2714d10

Browse files
committed
TUN-8829: add CONTAINER_BUILD to dockerfiles
Closes TUN-8829
1 parent ac57ed9 commit 2714d10

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ ARG TARGET_GOOS
33
ARG TARGET_GOARCH
44
FROM golang:1.22.5 as builder
55
ENV GO111MODULE=on \
6-
CGO_ENABLED=0 \
7-
TARGET_GOOS=${TARGET_GOOS} \
8-
TARGET_GOARCH=${TARGET_GOARCH} \
9-
CONTAINER_BUILD=1
6+
CGO_ENABLED=0 \
7+
TARGET_GOOS=${TARGET_GOOS} \
8+
TARGET_GOARCH=${TARGET_GOARCH} \
9+
# the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual
10+
# which changes how cloudflared binds the metrics server
11+
CONTAINER_BUILD=1
1012

1113

1214
WORKDIR /go/src/github.com/cloudflare/cloudflared/

Dockerfile.amd64

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# use a builder image for building cloudflare
22
FROM golang:1.22.5 as builder
33
ENV GO111MODULE=on \
4-
CGO_ENABLED=0
4+
CGO_ENABLED=0 \
5+
# the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual
6+
# which changes how cloudflared binds the metrics server
7+
CONTAINER_BUILD=1
58

69
WORKDIR /go/src/github.com/cloudflare/cloudflared/
710

Dockerfile.arm64

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# use a builder image for building cloudflare
22
FROM golang:1.22.5 as builder
33
ENV GO111MODULE=on \
4-
CGO_ENABLED=0
4+
CGO_ENABLED=0 \
5+
# the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual
6+
# which changes how cloudflared binds the metrics server
7+
CONTAINER_BUILD=1
58

69
WORKDIR /go/src/github.com/cloudflare/cloudflared/
710

0 commit comments

Comments
 (0)