Skip to content

[Fix] Docker: Remove Hardcoded Prisma Binary Target For Multi-Arch Builds - #27170

Merged
yuneng-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_/unruffled-mcclintock-62a296
May 5, 2026
Merged

[Fix] Docker: Remove Hardcoded Prisma Binary Target For Multi-Arch Builds#27170
yuneng-berri merged 1 commit into
litellm_internal_stagingfrom
litellm_/unruffled-mcclintock-62a296

Conversation

@yuneng-berri

Copy link
Copy Markdown
Collaborator

Summary

Fixes #19458

Test plan

  • docker buildx build --platform linux/amd64 -f docker/Dockerfile.non_root . succeeds
  • docker buildx build --platform linux/arm64 -f docker/Dockerfile.non_root . succeeds
  • On the arm64 image: ls /app/.cache/prisma-python/binaries/node_modules/@prisma/engines/ shows schema-engine-linux-arm64-openssl-3.0.x (not -debian-)
  • On the arm64 image: prisma migrate deploy runs without Could not find schema-engine binary
  • On the amd64 image: image bytes / behavior unchanged from current main

…ilds

PRISMA_CLI_BINARY_TARGETS="debian-openssl-3.0.x" was hardcoded in
docker/Dockerfile.non_root by #17695. On a buildx linux/arm64 leg this
forces prisma to download the amd64 schema-engine into an arm64 image,
so 'prisma migrate deploy' fails at startup with 'Could not find
schema-engine binary'.

Removing the env lets prisma auto-detect per build platform: amd64
builds still resolve to debian-openssl-3.0.x (Wolfi falls back to
debian, same binary as before), and arm64 builds now correctly fetch
linux-arm64-openssl-3.0.x. The offline-cache pre-warm goal of #17695 is
preserved — only which binaries fill the cache changes.

Fixes #19458
@greptile-apps

greptile-apps Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the hardcoded PRISMA_CLI_BINARY_TARGETS="debian-openssl-3.0.x" env var from both the builder and runtime stages of docker/Dockerfile.non_root, allowing Prisma to auto-detect the correct binary target for each build platform. The fix is targeted and correct — on amd64 builds, Wolfi auto-detection still resolves to the debian target (no byte change), while arm64 builds now fetch the correct linux-arm64-openssl-3.0.x binary. The offline-cache pre-warm mechanism (PRISMA_OFFLINE_MODE=true, PRISMA_BINARY_CACHE_DIR, and the COPY /app/.cache path) is preserved intact.

Confidence Score: 4/5

Safe to merge — the two-line removal is logically correct and the offline-cache mechanism is untouched.

The fix is minimal and well-justified. Removing the hardcoded env var lets Prisma auto-detect the platform, which is the correct behavior for multi-arch builds. The existing offline-cache infrastructure (PRISMA_OFFLINE_MODE, PRISMA_BINARY_CACHE_DIR, COPY from builder) remains intact. Score is 4 rather than 5 only because all test plan checkboxes are unchecked — no build verification evidence has been provided yet.

No files require special attention beyond confirming schema.prisma does not also hardcode binaryTargets (not changed in this PR).

Important Files Changed

Filename Overview
docker/Dockerfile.non_root Removes hardcoded PRISMA_CLI_BINARY_TARGETS="debian-openssl-3.0.x" from both builder and runtime ENV blocks, allowing Prisma to auto-detect the correct binary target per build platform (amd64 or arm64)

Reviews (1): Last reviewed commit: "[Fix] Docker: Remove Hardcoded Prisma Bi..." | Re-trigger Greptile

@yuneng-berri
yuneng-berri enabled auto-merge May 5, 2026 04:40
@yuneng-berri
yuneng-berri merged commit f318ef0 into litellm_internal_staging May 5, 2026
96 of 103 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_/unruffled-mcclintock-62a296 branch May 5, 2026 04:43
@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…intock-62a296

[Fix] Docker: Remove Hardcoded Prisma Binary Target For Multi-Arch Builds
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.

[Bug]: Multi-arch builds broken: Hardcoded PRISMA_CLI_BINARY_TARGETS forces AMD64 binaries on ARM64

2 participants