From a9f29e851bdd886a165d84fe73f9c63152a26c49 Mon Sep 17 00:00:00 2001 From: Jean-Marc ANDRE Date: Sun, 13 Dec 2020 20:51:36 +0100 Subject: [PATCH] Go can cross compile. qemu not needed --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8c6e6f6..30fd03d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM arm32v7/golang:alpine as builder +FROM golang:alpine as builder WORKDIR /workspace # Copy the Go Modules manifests @@ -16,7 +16,7 @@ COPY pkg/ pkg/ COPY controllers/ controllers/ # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GO111MODULE=on go build -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 GO111MODULE=on 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