Skip to content

feat(cli): support flattened builds - #8724

Draft
Parker J. Rule (pjrule) wants to merge 13 commits into
mainfrom
parker/08-25/single-user-layer
Draft

feat(cli): support flattened builds#8724
Parker J. Rule (pjrule) wants to merge 13 commits into
mainfrom
parker/08-25/single-user-layer

Conversation

@pjrule

Copy link
Copy Markdown
Collaborator

Summary

  • add an opt-in --single-user-layer flag to langgraph build
  • generate one bind-mounted RUN for source copy, dependency installation, API restoration, and build-tool cleanup
  • preserve runtime ENV and WORKDIR in the resulting image config
  • retain the existing layered generator for unsupported or more complex build shapes

Expected impact

In the Kubernetes BuildKit benchmark, combining the generated Python user steps into one non-empty filesystem layer reduced median C3 + gVisor solve time by about 10 seconds (54.93s to 44.76s). Fast samples showed roughly 20–24 seconds of structural savings. Compressed image size was effectively unchanged; the gain came from avoiding repeated native-snapshot copies.

This deliberately trades fine-grained warm-cache reuse for faster cold, short-lived builders.

Validation

  • make format
  • make lint
  • make test (337 passed)
  • Docker Buildx outline validation of a generated single-layer Dockerfile

@pjrule Parker J. Rule (pjrule) changed the title feat(cli): support single-layer user builds feat(cli): support flattened builds Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant