Pin Python builder to alpine3.23 to match runtime stage#472
Conversation
The runtime stage is `FROM alpine:3.23` and copies /usr/local from the python-deps builder verbatim. Leaving the builder on the floating `python:3.13-alpine` tag risks compiling Python + site-packages C extensions against a newer Alpine's musl while running on alpine:3.23 — a real ABI-mismatch hazard, not just a reproducibility nit. Tag verified to exist on Docker Hub via `docker manifest inspect`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Re-evaluating a finding I previously skipped from CodeRabbit's review of #467 — turns out it's a real correctness issue, not just a reproducibility nit, so worth fixing now rather than waiting for a separate hardening PR.
Context
src/docker/build/docker-image/Dockerfilehas three stages:FROM node:22-alpine— Angular build (output copied as static assets, no ABI concern)FROM python:3.13-alpine AS python-deps— installs Python + dependenciesFROM alpine:3.23 AS runtime— copies/usr/local/verbatim from stage 2Stage 3 line 83:
COPY --from=python-deps /usr/local/ /usr/local/That copies the Python interpreter binary + every C extension in site-packages from a builder compiled against whatever Alpine
python:3.13-alpineresolves to today, into a runtime that's pinned to Alpine 3.23.The risk
If the floating
python:3.13-alpinetag ever resolves to a newer Alpine (3.24+), the Python binary and any C extensions in site-packages were compiled against the newer Alpine's musl. They then execute against alpine:3.23's older musl at runtime. musl is mostly backwards-compatible but the ABI isn't formally stable across minor versions — this is a real silent-runtime-failure hazard, not just a reproducibility concern.The fix
Pin the builder to
python:3.13-alpine3.23so both stages use the same Alpine minor.Tag verified to exist on Docker Hub via
docker manifest inspect python:3.13-alpine3.23.Validation
🤖 Generated with Claude Code