We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46358a8 commit 989f9a4Copy full SHA for 989f9a4
1 file changed
Dockerfile
@@ -16,8 +16,9 @@ COPY controllers/ controllers/
16
COPY common/ common/
17
COPY version/ version/
18
19
-# Build
20
-RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager ./cmd/main.go
+# Build - Use TARGETARCH to build for the correct architecture
+ARG TARGETARCH
21
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -a -o manager ./cmd/main.go
22
23
# Use distroless as minimal base image to package the manager binary
24
# Refer to https://github.com/GoogleContainerTools/distroless for more details
0 commit comments