mirror of
https://github.com/shenxn/protonmail-bridge-docker.git
synced 2026-03-26 21:35:58 +00:00
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:
parent
fcebd8a198
commit
e769e2bbb0
7
.github/workflows/build.yaml
vendored
7
.github/workflows/build.yaml
vendored
@ -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: |
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user