fix: update Docker base images to Trixie and force pull latest images in nightly builds#13015
Conversation
… in nightly builds - Update builder stage: bookworm-slim → trixie-slim (5 Dockerfiles) - Update runtime stage: python:3.12.13-slim-trixie → python:3.12-slim-trixie - Add pull: true to 6 Docker build steps in nightly workflow - Forces pulling latest base images instead of using cached layers This resolves CVE vulnerabilities in Docker images by ensuring we use the latest Debian Trixie base images instead of cached Bookworm layers.
WalkthroughThis PR adds the ChangesWorkflow Build Action Configuration
Dockerfile Base Image Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 9✅ Passed checks (9 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docker/build_and_push_ep.Dockerfile`:
- Line 12: The comment about using python:3.12.3-slim is stale relative to the
actual Docker FROM line (FROM ghcr.io/astral-sh/uv:python3.12-trixie-slim AS
builder); update or remove that rationale so it reflects the current base image
(ghcr.io/astral-sh/uv:python3.12-trixie-slim) and, if keeping a note, explain
why this uv-based image is preferred vs. python:3.12.3-slim to avoid future
confusion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: dcacba8c-d5ae-4537-8d9a-b4b79f790b2e
📒 Files selected for processing (6)
.github/workflows/docker-nightly-build.ymldocker/build_and_push.Dockerfiledocker/build_and_push_backend.Dockerfiledocker/build_and_push_base.Dockerfiledocker/build_and_push_ep.Dockerfiledocker/build_and_push_with_extras.Dockerfile
| # 2. do not add --platform=$BUILDPLATFORM because the pydantic binaries must be resolved for the final architecture | ||
| # Use a Python image with uv pre-installed | ||
| FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder | ||
| FROM ghcr.io/astral-sh/uv:python3.12-trixie-slim AS builder |
There was a problem hiding this comment.
Update stale base-image rationale comment near Line 12.
The note says to use python:3.12.3-slim, but the build now uses ghcr.io/astral-sh/uv:python3.12-trixie-slim. Please update/remove that note to avoid future confusion.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docker/build_and_push_ep.Dockerfile` at line 12, The comment about using
python:3.12.3-slim is stale relative to the actual Docker FROM line (FROM
ghcr.io/astral-sh/uv:python3.12-trixie-slim AS builder); update or remove that
rationale so it reflects the current base image
(ghcr.io/astral-sh/uv:python3.12-trixie-slim) and, if keeping a note, explain
why this uv-based image is preferred vs. python:3.12.3-slim to avoid future
confusion.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13015 +/- ##
==========================================
- Coverage 53.02% 52.99% -0.04%
==========================================
Files 2031 2031
Lines 183971 183971
Branches 26213 26213
==========================================
- Hits 97545 97488 -57
- Misses 85318 85375 +57
Partials 1108 1108
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Description
Updates Docker base images to Debian Trixie and adds
pull: trueto nightly build workflow to resolve CVE vulnerabilities.This PR is created directly from
mainbranch (not cherry-picked) to avoid future merge conflicts.Changes
1. Dockerfile Updates (5 files)
ghcr.io/astral-sh/uv:python3.12-bookworm-slim→ghcr.io/astral-sh/uv:python3.12-trixie-slimpython:3.12.13-slim-trixie→python:3.12-slim-trixie(unpinned for latest patches)Files updated:
docker/build_and_push_base.Dockerfiledocker/build_and_push.Dockerfiledocker/build_and_push_backend.Dockerfiledocker/build_and_push_with_extras.Dockerfiledocker/build_and_push_ep.Dockerfile2. Workflow Update
pull: trueto 6 Docker build steps in.github/workflows/docker-nightly-build.ymlWhy Both Changes Are Needed
main, so changes must be hereTesting
Future Work (Phase 2)
As noted by @jordanrfrazier in #13014, we should eventually:
python:3.12.15-slim-trixie)pull: truefrom workflow (makes builds faster and more predictable)This PR is Phase 1 (temporary fix with
pull: true). Phase 2 will come ~2 weeks after CVEs are confirmed fixed.Related
release-1.10.0: fix: update Docker base images to latest Python 3.12 and Debian Trixie to resolve CVEs #12990, fix: force pull latest base images in Docker nightly builds #13014mainto avoid merge conflicts whenrelease-1.10.0merges backSummary by CodeRabbit
Release Notes