Skip to content

multi-arch docker won't build for non-native arch when using scratch. #1967

Answered by caarlos0
koshatul asked this question in Q&A
Discussion options

You must be logged in to vote

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.ope…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@caarlos0
Comment options

@koshatul
Comment options

Answer selected by caarlos0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1967 on December 28, 2020 20:08.