ISSUE-313-BUILDX

This commit is contained in:
Andrea Spacca
2020-06-14 19:53:36 +02:00
parent 92055f1b3c
commit 18f4b42cf1
2 changed files with 74 additions and 1 deletions

View File

@@ -1,6 +1,12 @@
# Default to Go 1.13
ARG GO_VERSION=1.13
FROM golang:${GO_VERSION}-alpine as build
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine as build
# Convert TARGETPLATFORM to GOARCH format
# https://github.com/tonistiigi/xx
COPY --from=tonistiigi/xx:golang / /
ARG TARGETPLATFORM
# Necessary to run 'go get' and to compile the linked binary
RUN apk add git musl-dev