ci: Added platform to docker build cmd line

This commit is contained in:
Geoff Bourne 2020-12-25 20:38:24 -06:00
parent 58fb69878a
commit 8ccbdbfa38
2 changed files with 10 additions and 2 deletions

View File

@ -38,6 +38,9 @@ dockers:
- "itzg/{{ .ProjectName }}:{{ .Version }}-amd64"
- "itzg/{{ .ProjectName }}:latest"
goarch: amd64
build_flag_templates:
- --platform
- linux/amd64
binaries:
- mc-router
- image_templates:
@ -45,10 +48,16 @@ dockers:
goarch: arm64
binaries:
- mc-router
build_flag_templates:
- --platform
- linux/arm64
- image_templates:
- "itzg/{{ .ProjectName }}:{{ .Version }}-arm32v6"
goarch: arm
goarm: "6"
build_flag_templates:
- --platform
- linux/arm/v6
binaries:
- mc-router
docker_manifests:

View File

@ -1,4 +1,3 @@
ARG TARGETPLATFORM
FROM --platform=$TARGETPLATFORM scratch
FROM scratch
COPY mc-router /
ENTRYPOINT ["/mc-router"]