Skip to content

Commit

Permalink
Add cloudflared
Browse files Browse the repository at this point in the history
  • Loading branch information
piperswe committed May 7, 2023
1 parent 1bc00eb commit cf80153
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cloudflared/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# syntax=docker/dockerfile:1

FROM --platform=$BUILDPLATFORM build as builder

RUN --mount=type=cache,target=/gocache build-go cloudflared https://github.com/cloudflare/cloudflared.git 2023.5.0 ./cmd/cloudflared

FROM scratch

ARG TARGETARCH
COPY --from=builder /app/cloudflared-$TARGETARCH /usr/local/bin/cloudflared
18 changes: 18 additions & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
group "default" {
targets = [
"build",
"cloudflared",
"docker-buildx",
"docker-cli",
"docker-cli-full",
Expand All @@ -24,6 +25,23 @@ target "build" {
]
}

target "cloudflared" {
tags = [
"ghcr.io/lutriseng/static-oci/cloudflared:latest",
"ghcr.io/lutriseng/static-oci/cloudflared:2023.5.0"
]
cache-to = ["type=inline,mode=max"]
cache-from = ["ghcr.io/lutriseng/static-oci/cloudflared"]
context = "cloudflared"
contexts = {
build = "target:build"
}
platforms = [
"linux/amd64",
"linux/arm64"
]
}

target "docker-buildx" {
tags = [
"ghcr.io/lutriseng/static-oci/docker-buildx:latest",
Expand Down

0 comments on commit cf80153

Please sign in to comment.