Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build/devapp: handle module dependencies more intelligently in Dockerfile #34192

Open
toothrot opened this issue Sep 9, 2019 · 4 comments

Comments

@toothrot
Copy link
Contributor

commented Sep 9, 2019

The x/build/devapp Dockerfile contains extra steps to optimize the speed of repeated docker builds when the go.mod or go.sum files have not changed. It would be nice to have a more automated way of doing this that doesn't require us to remember to add some our dependencies manually inside of our Dockerfile.

See golang.org/cl/193878

@andybons

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

What kind of speedup do we get from this optimization?

@dmitshur

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

/cc @bradfitz Might be most familiar with the effect of this optimization.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

The point is to speed up incremental development.

Checking now, it looks like it's ~11 seconds to do an increment "make docker-prod" after doing a minor change to x/build/devapp/*.go.

But without it, incremental builds are ~22 seconds, assuming you're on a really fast network (Google corp, wired). Because without those lines you pull lots of source from proxy.golang.org.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Sep 9, 2019

Btw, we used to have such a tool: gitlock. The current TODOs in our Dockerfiles come from removing that, in our move to using modules. (#26872)

See also: #27719

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.