[Fix] Docker: Remove Hardcoded Prisma Binary Target For Multi-Arch Builds - #27170
Conversation
…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 SummaryThis PR removes the hardcoded Confidence Score: 4/5Safe 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).
|
| 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
f318ef0
into
litellm_internal_staging
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…intock-62a296 [Fix] Docker: Remove Hardcoded Prisma Binary Target For Multi-Arch Builds
Summary
PRISMA_CLI_BINARY_TARGETS="debian-openssl-3.0.x"was hardcoded in docker/Dockerfile.non_root by [Feature] Download Prisma binaries at build time instead of at runtime for Security Restricted environments #17695. On abuildx linux/arm64leg this forces prisma to download the amd64schema-engineinto an arm64 image, soprisma migrate deployfails at startup withCould not find schema-engine binary(pathschema-engine-linux-arm64-openssl-3.0.x).debian-openssl-3.0.x(Wolfi auto-detect falls back to debian — same binary as before, no image-byte change), and arm64 builds now correctly fetchlinux-arm64-openssl-3.0.x.prisma generate+ theCOPY /app/.cacheinto runtime +PRISMA_OFFLINE_MODE=trueare untouched. Only which binaries fill the cache changes.Fixes #19458
Test plan
docker buildx build --platform linux/amd64 -f docker/Dockerfile.non_root .succeedsdocker buildx build --platform linux/arm64 -f docker/Dockerfile.non_root .succeedsls /app/.cache/prisma-python/binaries/node_modules/@prisma/engines/showsschema-engine-linux-arm64-openssl-3.0.x(not-debian-)prisma migrate deployruns withoutCould not find schema-engine binary