dnephin / dobi

A build automation tool for Docker applications
https://dnephin.github.io/dobi/
Apache License 2.0
309 stars 36 forks source link

Depends feature for images #161

Open vharitonsky opened 5 years ago

vharitonsky commented 5 years ago

Hi, I wish to contribute a new feature to dobi, which can help us use it in development more, but first I need your approval and maybe advice. Feature consists of two parts: depends-on: ["path1", "path2"...] property on image object which will fetch the files from host, concatenate them and calculate their hash, this hash will got into depends.sha/depends.short_sha env variables. Using {depends.sha} in tags will tag the image accoding to the calculated hash.

In combination those features allow us to create a dev container which is tied a certain number of files like package.json or requirements.txt and never rebuild it on developer machines, but instead pre-build on CI.

Probably the naming is not very thought out, but I hope you can help me with it.

Thank you for this great little gem, looking forward to hearing from you.

dnephin commented 5 years ago

Hello! Thank you for your interest in this project.

I do not have much time to dedicate to dobi these days. I still use it myself almost daily, but I haven't needed to add any features for months. I may be able to look at some PRs, but I can't promise any time frames. You might get better mileage by working on your own fork.

My initial very quick impression of those features:

So you might be able to do this already without any code changes, but I have no tried it.