Skip to content
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

Depends feature for images #161

Open
vharitonsky opened this issue Feb 26, 2019 · 1 comment
Open

Depends feature for images #161

vharitonsky opened this issue Feb 26, 2019 · 1 comment

Comments

@vharitonsky
Copy link

vharitonsky commented Feb 26, 2019

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
Copy link
Owner

dnephin commented Mar 20, 2019

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:

  • being able to automatically calculate a hash from files sounds cool, but doesn't seem like it fits with depends-on. I wonder if that could be done as a job:capture() task.
  • once captured you would be able to use the env var as a tag in the image.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants