-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 multistage caching with COPY --from #2559
Fix multistage caching with COPY --from #2559
Conversation
Thanks for the PR here @kt-315! Haven't had a chance to go through the code yet, from the Log Snippet:
|
16fe08e
to
c13c5b0
Compare
Hi! I have fixed this mistakes |
Just tried this, seems to be working great! Left some small nit comments, LGTM! Will wait 1-2 days to merge if you want to fix nit. Thanks for your work here!! Using the repro steps from #1244 at HEAD vs this PR I am seeing the multi-stage layers being cache: Repro steps copied from above issue reproduced below:
Running the repro steps @ HEAD:
Running the repro steps at this PR:
|
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.
LGTM! Thanks for the PR here @kt-315. Left one small nit comment
* Removed block on use --cache-copy-layers with multistage builds * Removed using digest in composite key with command COPY --from * COPY --from command uses src as file context (only changed files will be reason for change hash) * ARG and ENV changed before COPY dont change composite key * Add and fix some tests * Caching work same as caching in docker buildx
c13c5b0
to
c4aa728
Compare
* Removed block on use --cache-copy-layers with multistage builds * Removed using digest in composite key with command COPY --from * COPY --from command uses src as file context (only changed files will be reason for change hash) * ARG and ENV changed before COPY dont change composite key * Add and fix some tests * Caching work same as caching in docker buildx Co-authored-by: Sergei Kraev <skraev@tradingview.com>
Fixes #1244
Fixes #1877
Description
Submitter Checklist
Reviewer Notes
Release Notes
--cache-copy-layers is available again for multistage builds