Skip to content

Commit

Permalink
fixup! wip: Fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
mumoshu committed Mar 3, 2022
1 parent c24ac00 commit ac017f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ ARG TARGETPLATFORM TARGETOS TARGETARCH TARGETVARIANT
# We intentionally avoid `--mount=type=cache,mode=0777,target=/go/pkg/mod` in the `go mod download` and the `go build` runs
# to avoid https://github.com/moby/buildkit/issues/2334
# We can use docker layer cache so the build is fast enogh anyway
# We also use per-platform GOCACHE for the same reason.
env GOCACHE /build/${TARGETPLATFORM}/root/.cache/go-build

# Build
RUN --mount=target=. \
--mount=type=cache,mode=0777,target=/root/.cache/go-build \
--mount=type=cache,mode=0777,target=${GOCACHE} \
GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT#v} \
go build -o /out/manager main.go && go build -o /out/github-webhook-server ./cmd/githubwebhookserver

Expand Down

0 comments on commit ac017f0

Please sign in to comment.