Go can cross compile no need for qemu

This commit is contained in:
Jean-Marc ANDRE 2020-12-13 20:42:53 +01:00
parent 72250c1144
commit 36d7f89642

View File

@ -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 .