Rootless Docker builds silently ignore BuildKit memory limits
In rootless mode, Docker BuildKit silently drops per-step resource limits: a step capped at 256 MB allocated 600 MB and exited 0. The cause is the ToRootless() spec conversion that nils Linux Resources; rootful builds enforce the limit correctly (exit 137).
- A step limited to 256 MB allocated 600 MB and the build exited 0
- docker run --memory 256m on the same daemon was killed (137)
- Cause: BuildKit's ToRootless() nils Linux Resources and cgroup path
- Proposed fixes: buildkit#7288 (warn) and #7289 (apply on cgroup v2)
Read next
Software