From e769e2bbb0c893a936e578517207b2b376edf2f3 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 24 Feb 2026 21:16:50 -0600 Subject: [PATCH] Fix riscv64 runtime: use sid-slim on riscv64, bookworm-slim elsewhere debian:bookworm-slim has no riscv64 image. Parameterize the runtime base via RUNTIME_IMAGE build-arg; the workflow passes sid-slim for riscv64 and bookworm-slim for all other platforms. --- .github/workflows/build.yaml | 7 +++++++ build/Dockerfile | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3ad7480..7b18b91 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -91,6 +91,12 @@ jobs: run: | platform=${{ matrix.platform }} echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + # debian:bookworm-slim has no riscv64 image; fall back to sid-slim for that platform + if [ "$platform" = "linux/riscv64" ]; then + echo "RUNTIME_IMAGE=debian:sid-slim" >> $GITHUB_ENV + else + echo "RUNTIME_IMAGE=debian:bookworm-slim" >> $GITHUB_ENV + fi - name: Set version run: echo "version=$(cat VERSION)" >> $GITHUB_ENV @@ -126,6 +132,7 @@ jobs: sbom: false build-args: | version=${{ env.version }} + RUNTIME_IMAGE=${{ env.RUNTIME_IMAGE }} - name: Export digest run: | diff --git a/build/Dockerfile b/build/Dockerfile index 51b3681..a33c4d6 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -1,5 +1,7 @@ # debian:sid-slim is required for the build stage to support riscv64 (golang:bookworm does not). -# For the runtime stage we use debian:bookworm-slim for stable, predictable package names. +# For the runtime stage we default to debian:bookworm-slim for stable, predictable package names. +# riscv64 requires debian:sid-slim at runtime too (bookworm has no riscv64 image); +# the workflow passes RUNTIME_IMAGE=debian:sid-slim for that platform. FROM debian:sid-slim AS build ARG version @@ -12,7 +14,8 @@ ADD https://github.com/ProtonMail/proton-bridge.git#${version} /build/ WORKDIR /build/ RUN make build-nogui vault-editor -FROM debian:bookworm-slim +ARG RUNTIME_IMAGE=debian:bookworm-slim +FROM ${RUNTIME_IMAGE} LABEL maintainer="Dan Williams " EXPOSE 25/tcp