Skip to content

Pin Python builder to alpine3.23 to match runtime stage#472

Merged
nitrobass24 merged 1 commit into
developfrom
fix/coderabbit-findings
May 5, 2026
Merged

Pin Python builder to alpine3.23 to match runtime stage#472
nitrobass24 merged 1 commit into
developfrom
fix/coderabbit-findings

Conversation

@nitrobass24
Copy link
Copy Markdown
Owner

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/Dockerfile has three stages:

  1. FROM node:22-alpine — Angular build (output copied as static assets, no ABI concern)
  2. FROM python:3.13-alpine AS python-deps — installs Python + dependencies
  3. FROM alpine:3.23 AS runtime — copies /usr/local/ verbatim from stage 2

Stage 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-alpine resolves to today, into a runtime that's pinned to Alpine 3.23.

The risk

If the floating python:3.13-alpine tag 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.23 so both stages use the same Alpine minor.

Tag verified to exist on Docker Hub via docker manifest inspect python:3.13-alpine3.23.

Validation

  • CI on this PR runs the full Docker build + E2E suite, which exercises Python imports against the runtime — any musl ABI breakage would surface there
  • Image build itself fails fast if the tag doesn't exist (it does)

🤖 Generated with Claude Code

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Warning

Rate limit exceeded

@nitrobass24 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 34 seconds before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: d7d729ab-968e-40b4-b1b4-18062fa8e49c

📥 Commits

Reviewing files that changed from the base of the PR and between 65c1339 and c363f85.

📒 Files selected for processing (1)
  • src/docker/build/docker-image/Dockerfile
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/coderabbit-findings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nitrobass24 nitrobass24 merged commit 7cc5de4 into develop May 5, 2026
18 checks passed
@nitrobass24 nitrobass24 deleted the fix/coderabbit-findings branch May 5, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant