Skip to content

Commit

Permalink
ci: improve docker build perf
Browse files Browse the repository at this point in the history
  • Loading branch information
whatwewant committed Sep 26, 2023
1 parent 191dcd1 commit 6c65341
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Builder
FROM whatwewant/builder-go:v1.20-1 as builder
FROM --platform=$BUILDPLATFORM whatwewant/builder-go:v1.20-1 as builder

WORKDIR /build

Expand All @@ -11,7 +11,11 @@ RUN go mod download

COPY . .

ARG TARGETARCH

RUN CGO_ENABLED=0 \
GOOS=linux \
GOARCH=$TARGETARCH \
go build \
-trimpath \
-ldflags '-w -s -buildid=' \
Expand Down

0 comments on commit 6c65341

Please sign in to comment.