-
Notifications
You must be signed in to change notification settings - Fork 2
Add support for imagefs and fix multi-stage cache probing #25
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
Conversation
| args: args{ | ||
| dockerfile: ` | ||
| FROM scratch as target | ||
| COPY --from=alpine /etc/alpine-release /etc/alpine-release |
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.
nit: have you tried implementing more tests?
- FROM three different image.
- Copy symlink.
- Overwriting a file FROM first image with the file FROM the second image.
- Image with cycle symlink inside.
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.
I enabled the disabled TestDoCacheProbe/MultiStage test and added a symlink copy. This tests the basics of cache probe for multi-stage. We'll do more integration testing in envbuilder.
johnstcn
left a comment
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.
👍 Nice work!
Co-authored-by: Cian Johnston <cian@coder.com>
mtojek
left a comment
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.
Go!
This PR adds support for
imagefswhich currently only supports pre-caching requested files. This means that Dockerfile instructions are resolved ahead of time to figure out which files to cache.This allows tar archives to be walked once and since files are hashed as-we-go, the implementation is also memory efficient.
Once envbuilder updates to this fork, tha issue coder/envbuilder#230 will be resolved.