cloudflare/cloudflared

Public

mirrored from https://github.com/cloudflare/cloudflaredAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
d03469b6d3467d2e79b741bdb9dc9bdfdacaaf6f

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Dockerfile

28lines · modecode

1# use a builder image for building cloudflare
2FROM golang:1.13.3 as builder
3ENV GO111MODULE=on
4ENV CGO_ENABLED=0
5ENV GOOS=linux
6
7WORKDIR /go/src/github.com/cloudflare/cloudflared/
8
9# copy our sources into the builder image
10COPY . .
11
12# compile cloudflared
13RUN make cloudflared
14
15# ---
16
17# use a distroless base image with glibc
18FROM gcr.io/distroless/base-debian10:nonroot
19
20# copy our compiled binary
21COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
22
23# run as non-privileged user
24USER nonroot
25
26# command / entrypoint of container
27ENTRYPOINT ["cloudflared", "--no-autoupdate"]
28CMD ["version"]