msv-lab / modus

A language for building Docker/OCI container images
GNU Affero General Public License v3.0
279 stars 9 forks source link

Expose buildkit's cache mount functionality? #119

Open maowtm opened 2 years ago

maowtm commented 2 years ago

This allows adding a mounted directory that persists between build runs. For example, we can mount target to such a cache, and cargo would not have to re-compile all the dependencies on each image build. (Currently this is achieved in our own Modusfile with a slight hack).

maowtm commented 2 years ago

Proposal: ::cached(path) (path can be relative or absolute, resolved based on cwd). Dir will initially just be empty.