-
Describe the bug When attempting to build multi-arch docker images, To Reproduce build binary and then attempt to use before:
hooks:
- make test
builds:
- id: traefik-acme
main: ./cmd/traefik-acme
binary: traefik-acme
targets:
- linux_amd64
- darwin_amd64
- linux_arm_5
- linux_arm_7
- linux_arm64
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
-
goos: linux
goarch: amd64
dockerfile: Dockerfile
binaries:
- traefik-acme
builds:
- traefik-acme
build_flag_templates:
- "--build-arg=PLATFORM=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
image_templates:
- "koshatul/traefik-acme:latest-amd64"
- "koshatul/traefik-acme:v{{ .Major }}-amd64"
- "koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-amd64"
-
goos: linux
goarch: arm64
dockerfile: Dockerfile
binaries:
- traefik-acme
builds:
- traefik-acme
build_flag_templates:
- "--build-arg=PLATFORM=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
image_templates:
- "koshatul/traefik-acme:latest-arm64v8"
- "koshatul/traefik-acme:v{{ .Major }}-arm64v8"
- "koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-arm64v8"
-
goos: linux
goarch: arm
goarm: 7
dockerfile: Dockerfile
binaries:
- traefik-acme
builds:
- traefik-acme
build_flag_templates:
- "--build-arg=PLATFORM=linux/arm/v7"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
image_templates:
- "koshatul/traefik-acme:latest-armv7"
- "koshatul/traefik-acme:v{{ .Major }}-armv7"
- "koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-armv7"
docker_manifests:
- name_template: koshatul/traefik-acme:v{{ .Major }}
image_templates:
- koshatul/traefik-acme:v{{ .Major }}-amd64
- koshatul/traefik-acme:v{{ .Major }}-armv7
- koshatul/traefik-acme:v{{ .Major }}-arm64v8
- name_template: koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}
image_templates:
- koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-amd64
- koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-armv7
- koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-arm64v8
- name_template: koshatul/traefik-acme:latest
image_templates:
- koshatul/traefik-acme:latest-amd64
- koshatul/traefik-acme:latest-armv7
- koshatul/traefik-acme:latest-arm64v8 FROM scratch
COPY traefik-acme /
ENTRYPOINT [ "/traefik-acme" ] Expected behavior
Environment (please complete the following information):
Additional context Because The fix is probably to add a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Pretty sure you can change your config to: before:
hooks:
- make test
builds:
- id: traefik-acme
main: ./cmd/traefik-acme
binary: traefik-acme
targets:
- linux_amd64
- darwin_amd64
- linux_arm_5
- linux_arm_7
- linux_arm64
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
-
goos: linux
goarch: amd64
dockerfile: Dockerfile
binaries:
- traefik-acme
builds:
- traefik-acme
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
image_templates:
- "koshatul/traefik-acme:latest-amd64"
- "koshatul/traefik-acme:v{{ .Major }}-amd64"
- "koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-amd64"
-
goos: linux
goarch: arm64
dockerfile: Dockerfile
binaries:
- traefik-acme
builds:
- traefik-acme
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
image_templates:
- "koshatul/traefik-acme:latest-arm64v8"
- "koshatul/traefik-acme:v{{ .Major }}-arm64v8"
- "koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-arm64v8"
-
goos: linux
goarch: arm
goarm: 7
dockerfile: Dockerfile
binaries:
- traefik-acme
builds:
- traefik-acme
build_flag_templates:
- "--platform=linux/arm/v7"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
image_templates:
- "koshatul/traefik-acme:latest-armv7"
- "koshatul/traefik-acme:v{{ .Major }}-armv7"
- "koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-armv7"
docker_manifests:
- name_template: koshatul/traefik-acme:v{{ .Major }}
image_templates:
- koshatul/traefik-acme:v{{ .Major }}-amd64
- koshatul/traefik-acme:v{{ .Major }}-armv7
- koshatul/traefik-acme:v{{ .Major }}-arm64v8
- name_template: koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}
image_templates:
- koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-amd64
- koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-armv7
- koshatul/traefik-acme:v{{ .Major }}.{{ .Minor }}-arm64v8
- name_template: koshatul/traefik-acme:latest
image_templates:
- koshatul/traefik-acme:latest-amd64
- koshatul/traefik-acme:latest-armv7
- koshatul/traefik-acme:latest-arm64v8 and it should work.
GoReleaser doesn't translate goos/goarch/etc to docker platform names yet. |
Beta Was this translation helpful? Give feedback.
Pretty sure you can change your config to: