Skip to content

Commit

Permalink
Build faster
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuzu committed Feb 17, 2023
1 parent 25a2274 commit d4fc7c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build the manager binary
FROM golang:1.18 as builder
FROM --platform=$BUILDPLATFORM golang:1.18 as builder
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -18,7 +19,7 @@ COPY installer/ installer/
COPY common/ common/

# Build
RUN CGO_ENABLED=0 go build -a -o manager main.go
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -a -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down

0 comments on commit d4fc7c6

Please sign in to comment.