- Notifications
You must be signed in to change notification settings - Fork913
chore(dogfood): optimize dockerfile for envbuilder cache probing#14497
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
chore(dogfood): optimize dockerfile for envbuilder cache probing#14497
Uh oh!
There was an error while loading.Please reload this page.
Conversation
172bc8d
toc8b1add
Comparec8b1add
toe4fae2f
Comparedogfood/contents/Dockerfile Outdated
ARG GOPATH="/tmp/" | ||
RUN mkdir --parents "$GOPATH" && \ | ||
# Install Go utilities. | ||
RUN apt-get install --yes gcc && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You should still just merge the gcc with the curl apt install above to save build time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It can help cache utilization for when a Go tool version changes, but beyond that I don't see how there would be an improvement in build time?
Installing and uninstalling is a significant size optimization though:
sha256:ef2ad8c02872f01a9e71fc56afdf2ecda2a3d827ac61f5a9e1be0b096b79c335 About a minute ago RUN /bin/sh -c apt-get install gcc --yes # buildkit 159MB buildkit.dockerfile.v0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is install+cleanup:
sha256:b39c284ff9fac0da7a256f29de3116c5109f4f04e12291ded468314dde50b28a 19 seconds ago RUN /bin/sh -c apt-get install gcc --yes && apt-get remove --yes gcc && apt-get autoremove --yes && apt-get clean # buildkit 1.64MB buildkit.dockerfile.v0
I thoughtapt-get update
was pretty innocent but it's actually 50MB too. 😅
13e5c51
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR optimizes our dogfood
Dockerfile
for envbuilder caching/cache probing by reducing layer sizes and fixing an incompatible instruction.