Skip to content

Commit

Permalink
TUN-8829: add CONTAINER_BUILD to dockerfiles
Browse files Browse the repository at this point in the history
Closes TUN-8829
  • Loading branch information
Luis Neto committed Dec 20, 2024
1 parent ac57ed9 commit 2714d10
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -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/

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -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/

Expand Down

0 comments on commit 2714d10

Please sign in to comment.