Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Streaming build context for faster incremental build #566

Open
mumoshu opened this issue Mar 13, 2018 · 3 comments
Open

Streaming build context for faster incremental build #566

mumoshu opened this issue Mar 13, 2018 · 3 comments

Comments

@mumoshu
Copy link

mumoshu commented Mar 13, 2018

As far as I could see from the current codebase, draftd sends the whole project files as the build context to the docker daemon.
This, "in theory", slow down docker build by unnecessary sending unchanged files from draftd to docker daemon.

Similarly as I've noted in GoogleContainerTools/skaffold#195, I guess we could enhance draft to use streaming to send only diffs from draftd to docker daemon.

Just for clarification, this is for the "2" in the below diagram:

draft --1--> draftd --2--> docker daemon

Honestly, I'm not sure how the path "1" works today in draft. It would make sense to address it in an another github issue if necessary, too.

@bacongobbler
Copy link
Contributor

Yes! We would love to have this in place. I know @fibonacci1729 has played with a few ideas in this space and might be able to share some of this thoughts.

@squillace
Copy link
Contributor

@mumoshu the new draft .12 removes the daemon completely, removing the problem. Rerun tests, and see if there are still optimizations here we should work on.

@bacongobbler
Copy link
Contributor

bacongobbler commented Apr 5, 2018

While we have removed draftd from the system and thereby eliminated the draft --1--> draftd cycle, technically speaking we are still sending the entire build context to the docker daemon.

The architecture looks more like this:

draft --1--> docker daemon --> container registry (if configured) --> kubernetes

Docker has a relatively new feature that allows clients to send incremental build contexts to the daemon. We could take advantage of that during long-running sessions such as a draft up with the local file watcher feature enabled.

Other than that, you're completely right. For the most part this issue is moot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants