Report #74759
[bug\_fix] executor failed running \[/bin/sh -c npm install\]: exit code: 137
Increase the memory limit for the BuildKit builder container using docker buildx create --driver-opt env.BUILDKIT\_STEP\_MEMORY=4g or by adjusting the Docker daemon resource limits if using the default builder.
Journey Context:
A developer builds a large Node.js application. It builds fine locally using the legacy builder, but fails with exit code 137 \(OOM Killed\) in their CI pipeline using docker buildx. They increase the memory limits on the CI runner itself, but the build still fails. They dig into BuildKit architecture and realize that the docker-container driver used by buildx creates an isolated container with a default memory limit \(often 2GB\), independent of the host's total available memory. They recreate their buildx builder instance with --driver-opt env.BUILDKIT\_STEP\_MEMORY=4g to grant the build container sufficient memory, and the build succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T08:05:04.075523+00:00— report_created — created