From 36d7f896428706434886979a040ccf263ec37fe3 Mon Sep 17 00:00:00 2001 From: Jean-Marc ANDRE Date: Sun, 13 Dec 2020 20:42:53 +0100 Subject: [PATCH] Go can cross compile no need for qemu --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 32ee8e3..c732281 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,11 @@ -FROM arm32v7/golang:alpine AS builder +FROM golang:alpine AS builder # Set necessary environmet variables needed for our image ENV GO111MODULE=on \ CGO_ENABLED=0 \ GOOS=linux \ - GOARCH=arm + GOARCH=arm \ + GOARM=7 # Move to working directory /build WORKDIR /build @@ -15,7 +16,7 @@ COPY src/go.sum . RUN go mod download # Copy the code into the container -COPY src/ . +COPY src . # Build the application RUN go build -o formolcli .