Repository navigation
build(docker): refresh base images and ship only runtime files in component images (1.104.x) - #48280
Merged
Merged
Conversation
Bump the pinned wolfi-base digest in every Wolfi Dockerfile to 360896ef, which ships brotli 1.2.1-r1 and ca-certificates-bundle 20260909-r3. The previous digest already carried libbrotli 1.2.0-r6 as an OpenSSL dependency, and `apk add --no-cache` never upgrades a package the base already has Move the UI image to nginx 1.31.8-alpine3.24, whose CA bundle is the 20261020 Mozilla set, and upgrade brotli-libs in its runtime stage since no nginx digest ships 1.2.1 yet
…migrations images The component runtime stages copied the builder's whole /app, which is the entire repository plus build output: six lockfiles, helm, terraform, docs, .env.example and the Rust build tree. Measured at runtime with an audit hook on a booted container, the gateway reads only gateway/, litellm/ and enterprise/ from /app, the backend only backend/, litellm/ and enterprise/, and the migrations job only litellm/ and run.py. The pyproject.toml read is prisma-python's optional [tool.prisma] lookup, which ours does not define Copy just those, plus .venv, the entrypoint script and schema.prisma for the gateway and backend. PYTHONPATH=/app and the in-Dockerfile asserts are unchanged
ryan-crabbe-berri
approved these changes
Oct 25, 2026
shin-berri
approved these changes
Oct 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #48279 to stable/1.104.x
Every image moves to newer wolfi-base and nginx base images, which clears the Critical brotli finding image scanners report today and drops the emSign ECC Root CA - G3 root from the UI image's CA bundle. The gateway, backend and migrations images now copy only the files they run instead of the whole source tree, so scanners stop reporting packages from repo lockfiles that were never installed
Details
TLDR
Problem this solves:
How it solves it:
sha256:360896efin all six Wolfi Dockerfilesbrotli-libsin the UI image/appUser Flow
Before: a platform team scanning the gateway and UI images gets findings for things the images never use
/app/uv.lockand/app/terraform/provider/go.sumAfter: the same scan only reports what the images actually run
Linear ticket
Resolves LIT-10128
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or moreDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Images are built for linux/arm64 with
docker build -f <Dockerfile> .and scanned with grype 0.114.0. The fingerprint check is a local script that matches the SHA-256 fingerprint (86:A1:EC:BA:...) and public key of emSign ECC Root CA - G3 against every file in the image, so it also finds copies compiled into binaries. Hits under/opt/prismaare left out, see Caveats. The chat call uses this gateway config with a real Gemini keyBefore (4a8940a)
The published v1.104.6 images, whose Dockerfiles are identical to stable/1.104.x at 4a8940a. The gateway runs against the database the After run migrated
UI image
ghcr.io/berriai/litellm-ui:v1.104.6for emSign ECC Root CA - G3grype ghcr.io/berriai/litellm-ui:v1.104.6, Critical findingsGateway image
ghcr.io/berriai/litellm-gateway:v1.104.6outside the virtualenvgrype ghcr.io/berriai/litellm-gateway:v1.104.6, Critical findingsReal chat call through the gateway image
docker run -d -p 15604:4000 -e CONFIG_FILE_PATH=/app/config/config.yaml -e GEMINI_API_KEY -v ./config:/app/config:ro ghcr.io/berriai/litellm-gateway:v1.104.6, thencurl -s localhost:15604/health/readinesscurl -s localhost:15604/v1/chat/completions -H 'Authorization: Bearer $KEY' -d '{"model":"gemini-3.8-flash","messages":[{"role":"user","content":"Reply with exactly: image ok"}]}'After (99aa8f8)
q1104-*:prare local builds of this tipUI image
q1104-ui:prfor emSign ECC Root CA - G3grype q1104-ui:pr, Critical findingsGateway image
q1104-gateway:proutside the virtualenvgrype q1104-gateway:pr, Critical findingsReal chat call through the gateway image
docker run --rm --network proof-net -e DATABASE_URL=... q1104-migrations:prdocker run -d -p 14101:4000 -e CONFIG_FILE_PATH=/app/config/config.yaml -e GEMINI_API_KEY -v ./config:/app/config:ro q1104-gateway:pr, thencurl -s localhost:14101/health/readinesscurl -s localhost:14101/v1/chat/completions -H 'Authorization: Bearer $KEY' -d '{"model":"gemini-3.8-flash","messages":[{"role":"user","content":"Reply with exactly: image ok"}]}'Type
🐛 Bug Fix
🚄 Infrastructure
Caveats (if any)
Medium
/appin gateway, backend or migrations now misses themLow
/opt/prismastill embed a built-in root list that includes emSign ECC Root CA - G3Final Attestation