From f66116d4d8fec868d87015dfeda3bd0c8ca42de9 Mon Sep 17 00:00:00 2001 From: Gareth Date: Sat, 2 May 2026 22:03:56 -0700 Subject: [PATCH] fix various build issues --- .goreleaser.yaml | 12 ++++++++---- Dockerfile.alpine | 7 ++++--- Dockerfile.scratch | 11 ++++++----- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d692a292..c031b77b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -106,14 +106,16 @@ dockers_v2: dockerfile: Dockerfile.alpine flags: - "--pull" + # provenance attestations break the multi-arch manifest for armv6/armv7/386 + - "--provenance=false" ids: - linux - docker-entrypoint platforms: - linux/amd64 - linux/arm64 - - linux/armv6 - - linux/armv7 + - linux/arm/v6 + - linux/arm/v7 - linux/386 - id: scratch @@ -128,14 +130,16 @@ dockers_v2: dockerfile: Dockerfile.scratch flags: - "--pull" + # provenance attestations break the multi-arch manifest for armv6/armv7/386 + - "--provenance=false" ids: - linux - docker-entrypoint platforms: - linux/amd64 - linux/arm64 - - linux/armv6 - - linux/armv7 + - linux/arm/v6 + - linux/arm/v7 - linux/386 brews: diff --git a/Dockerfile.alpine b/Dockerfile.alpine index ddec214f..cb0d2398 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -4,9 +4,10 @@ RUN apk --no-cache add tini ca-certificates curl bash rclone openssh tzdata dock rclone selfupdate --stable RUN mkdir -p /tmp -# Copy the binary we built via goreleaser -COPY backrest /backrest -COPY docker-entrypoint /docker-entrypoint +ARG TARGETPLATFORM +# Binaries are staged per-platform by goreleaser dockers_v2 +COPY $TARGETPLATFORM/backrest /backrest +COPY $TARGETPLATFORM/docker-entrypoint /docker-entrypoint # Run the binary to install dependencies (may run via QEMU but necessary) RUN /backrest --install-deps-only diff --git a/Dockerfile.scratch b/Dockerfile.scratch index 64f96f1f..8b0e9af3 100644 --- a/Dockerfile.scratch +++ b/Dockerfile.scratch @@ -3,8 +3,9 @@ FROM alpine:latest AS alpine RUN apk add --no-cache ca-certificates tini-static RUN mkdir /tmp-orig -# Copy binary from goreleaser to run install-deps -COPY backrest /backrest +ARG TARGETPLATFORM +# Binaries are staged per-platform by goreleaser dockers_v2 +COPY $TARGETPLATFORM/backrest /backrest RUN /backrest --install-deps-only # Setup restic path @@ -20,9 +21,9 @@ COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ COPY --from=alpine /bin/restic /bin/restic COPY --from=alpine /sbin/tini-static /tini -# Copy binaries from goreleaser -COPY backrest /backrest -COPY docker-entrypoint /docker-entrypoint +ARG TARGETPLATFORM +COPY $TARGETPLATFORM/backrest /backrest +COPY $TARGETPLATFORM/docker-entrypoint /docker-entrypoint ENTRYPOINT ["/tini", "--", "/docker-entrypoint"] CMD ["/backrest"]