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
Better support for build caches #35
Comments
Currently proposing a new YAML field as below:
Folders will be created in
This gives the following steps: [x] Provide basic volume support in |
@bossmc - will probably get started on this tomorrow, but this is roughly what I'm thinking. |
Sounds good to me! Presumably if a floki.yaml asks to mount a shared volume that doesn't exist then it will be created but not backed by a host-path? |
I was thinking of backing it with a host path, creating it as needed. It can be overiden later, or we could provide some kind of merge strategy (but that might be overkill). |
👍 |
@bossmc on the linked PR I have some basic volume support (the first tick box above). It's not quite polished yet - it creates folders with the user permissions (not with Also this won't work with You an run with |
Actually, I'm not sure if in general we'd want things automatically mounted into |
(My initial testing has successfully bound a rust registry - no rebuilds when relaunching the container!) |
Just did a bit of testing, and so far all seems good. I even tested the hack we discussed on slack (symlinking from my real registry to the volume under
Without the mounted registry this takes ~2 mins. |
Cool. I think I'm happy with what I have as a first chunk of work, so after a review and a bit more testing I'll probably get it merged. |
I just merged #36 , so that gives the core volume support. |
I think the next step I want to take here is to add a simple subcommand to list out the volumes and their backing paths. This ought to make tracking the symlinking either scriptable (with some I also realised I obnoxiously decided to use |
Some build tools like to persist build data to disk. It would be nice if
floki
allowed build caches created inside the container to persist between container launches, and even across containers in different which might want to share a cache (e.g. Rust builds).Caches should work even if the user hasn't configured them (as in, they should do something sensible if enabled, and not rely on the users environment), but it may be worthwhile allowing users to set a particular file directory for a cache.
The text was updated successfully, but these errors were encountered: