Skip to content

Support json mode build context transfer - #84

Open
JaewonHur wants to merge 5 commits into
apple:mainfrom
JaewonHur:context-mode-json
Open

Support json mode build context transfer#84
JaewonHur wants to merge 5 commits into
apple:mainfrom
JaewonHur:context-mode-json

Conversation

@JaewonHur

Copy link
Copy Markdown
Contributor

This resolves apple/container#1515.

Tar mode build context transfer imposes high burden on host side as the host side proxy always have to archive and hash entire build context directory. While it lowers the excessive gRPC when there are lots of file read requests from buildkitd, it also comes with computing overhead when build context is large. Since we support docker ignore now, buildkitd can selectively ask the non-ignored files only.

Thus, json transfer mode supports on-demand file request, avoiding archiving entire build context at start.

Tar mode transfer imposes high burden on host side as the host side
proxy needs to always archive and send the entire build context. Json
mode transfer avoids this, but feeds the file contents to VM on-demand
when buildkitd requests. This gets lower host side computing overhead,
but has more gRPC calls.
Dockerignore contains staging directory path itself to ignore that
directory. ReceiveJson needs to honor it.
@JaewonHur
JaewonHur force-pushed the context-mode-json branch from 5412fcc to f7744f3 Compare July 31, 2026 20:26
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.

[Request]: Improve builder performance when build context is large

1 participant