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
Fix Dockerfile go dependency caching #2626
Fix Dockerfile go dependency caching #2626
Conversation
The current Dockerfile uses a bind mount when downloading the go dependencies. This causes the entire project folder to be added to the Docker context when only the `go.mod` and `go.sum` files are needed. This ends up breaking the caching of the dependencies as any change to any file in the project will cause the docker context to change. Removing this bind mount allows the dependencies to be correctly cached.
|
Welcome @hintofbasil! |
Hi @hintofbasil. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/easycla |
2 similar comments
/easycla |
/easycla |
/ok-to-test |
Codecov Report
@@ Coverage Diff @@
## main #2626 +/- ##
=======================================
Coverage 53.94% 53.94%
=======================================
Files 144 144
Lines 8197 8197
=======================================
Hits 4422 4422
Misses 3456 3456
Partials 319 319 Continue to review full report at Codecov.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hintofbasil, kishorj The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
The current Dockerfile uses a bind mount when downloading the go dependencies. This causes the entire project folder to be added to the Docker context when only the `go.mod` and `go.sum` files are needed. This ends up breaking the caching of the dependencies as any change to any file in the project will cause the docker context to change. Removing this bind mount allows the dependencies to be correctly cached.
Issue
N/A
Description
The current Dockerfile uses a bind mount when downloading the go dependencies.
This causes the entire project folder to be added to the Docker context when
only the
go.mod
andgo.sum
files are needed. This ends up breaking thecaching of the dependencies as any change to any file in the project will cause
the docker context to change. Removing this bind mount allows the dependencies
to be correctly cached.
Checklist
README.md
, or thedocs
directory)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯