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.
This commit is contained in:
Dan Williams 2026-02-24 21:16:50 -06:00
parent fcebd8a198
commit e769e2bbb0
2 changed files with 12 additions and 2 deletions

View File

@ -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: |

View File

@ -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 <dancwilliams@github>"
EXPOSE 25/tcp