File tree Expand file tree Collapse file tree 4 files changed +60
-3
lines changed Expand file tree Collapse file tree 4 files changed +60
-3
lines changed Original file line number Diff line number Diff line change 11images:
22 - name: cloudflared
3- dockerfile: Dockerfile
3+ dockerfile: Dockerfile.$ARCH
44 context: .
55 versions:
66 - latest
77 registries:
88 - name: docker.io/cloudflare
99 user: env:DOCKER_USER
1010 password: env:DOCKER_PASSWORD
11+ architectures:
12+ - amd64
13+ - arm64
Original file line number Diff line number Diff line change 11# use a builder image for building cloudflare
22ARG TARGET_GOOS
33ARG TARGET_GOARCH
4- FROM golang:1.18.1 as builder
4+ FROM golang:1.19 as builder
55ENV GO111MODULE=on \
66 CGO_ENABLED=0 \
77 TARGET_GOOS=${TARGET_GOOS} \
@@ -18,7 +18,7 @@ COPY . .
1818RUN make cloudflared
1919
2020# use a distroless base image with glibc
21- FROM gcr.io/distroless/base-debian10 :nonroot
21+ FROM gcr.io/distroless/base-debian11 :nonroot
2222
2323# copy our compiled binary
2424COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
Original file line number Diff line number Diff line change 1+ # use a builder image for building cloudflare
2+ FROM golang:1.19 as builder
3+ ENV GO111MODULE=on \
4+ CGO_ENABLED=0
5+
6+ LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared"
7+
8+ WORKDIR /go/src/github.com/cloudflare/cloudflared/
9+
10+ # copy our sources into the builder image
11+ COPY . .
12+
13+ # compile cloudflared
14+ RUN GOOS=linux GOARCH=amd64 make cloudflared
15+
16+ # use a distroless base image with glibc
17+ FROM gcr.io/distroless/base-debian11:nonroot
18+
19+ # copy our compiled binary
20+ COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
21+
22+ # run as non-privileged user
23+ USER nonroot
24+
25+ # command / entrypoint of container
26+ ENTRYPOINT ["cloudflared", "--no-autoupdate"]
27+ CMD ["version"]
Original file line number Diff line number Diff line change 1+ # use a builder image for building cloudflare
2+ FROM golang:1.19 as builder
3+ ENV GO111MODULE=on \
4+ CGO_ENABLED=0
5+
6+ LABEL org.opencontainers.image.source="https://github.com/cloudflare/cloudflared"
7+
8+ WORKDIR /go/src/github.com/cloudflare/cloudflared/
9+
10+ # copy our sources into the builder image
11+ COPY . .
12+
13+ # compile cloudflared
14+ RUN GOOS=linux GOARCH=arm64 make cloudflared
15+
16+ # use a distroless base image with glibc
17+ FROM gcr.io/distroless/base-debian11:nonroot
18+
19+ # copy our compiled binary
20+ COPY --from=builder --chown=nonroot /go/src/github.com/cloudflare/cloudflared/cloudflared /usr/local/bin/
21+
22+ # run as non-privileged user
23+ USER nonroot
24+
25+ # command / entrypoint of container
26+ ENTRYPOINT ["cloudflared", "--no-autoupdate"]
27+ CMD ["version"]
You can’t perform that action at this time.
0 commit comments