Something went wrong. Try again.
Cloudflare Tunnel client with NetBSD support
Something went wrong. Try again.
cloudflared Dockerfile.fips.arm64
1.7 kB · 38 lines
123456789101112131415161718192021222324252627282930313233343536373839# use a builder image for building cloudflaredARG CLOUDFLARE_DOCKER_REGISTRY_HOSTFROM ${CLOUDFLARE_DOCKER_REGISTRY_HOST:-registry.cfdata.org}/stash/plat/dockerfiles/debian-trixie-golang-boring/master:1.26.8-1@sha256:2cff81b1547df7c6bfe0cdba17b76678054d5054bedd71809be0829e5f3fc652 AS builderENV GO111MODULE=on \ CGO_ENABLED=1 \ GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct \ # 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/
# Download dependencies in their own layer so source-only changes reuse it.COPY go.mod go.sum ./RUN go mod download
COPY . .
# compile cloudflaredRUN FIPS=true GOOS=linux GOARCH=arm64 make cloudflared
# use a distroless base image with glibcFROM gcr.io/distroless/base-debian13:nonroot-arm64@sha256:7a4876f88e7fe3190972c274b679b3473f61e8d990a4dce3627961b3e22a0eaf
LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared"
# copy our compiled binaryCOPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
# run as nonroot user# We need to use numeric user id's because Kubernetes doesn't support strings:# https://github.com/kubernetes/kubernetes/blob/v1.33.2/pkg/kubelet/kuberuntime/security_context_others.go#L49# The `nonroot` user maps to `65532`, from: https://github.com/GoogleContainerTools/distroless/blob/main/common/variables.bzl#L18USER 65532:65532
# command / entrypoint of containerENTRYPOINT ["cloudflared", "--no-autoupdate"]CMD ["version"]