-
Notifications
You must be signed in to change notification settings - Fork 359
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG] Start reusing existing docker images if content hasn't changed #461
Conversation
Content providers can specify a "content ID" which is used to identify versions of the content. The ID is used in the docker image name and if we find an existing image for a given content ID the build step is skipped.
Should we switch to using tags instead of putting this in the image name? |
So this make me wonder... Could repo2docker do something like:
|
That idea is being explored in #410. The tricky part is figuring out what is a "content" file and what is a "environment" file. For example if you use a |
Am I correct that this is what the PR is implementing:
(maybe more generally, some more context about what this PR implements, why, what the big upsides are, etc would be helpful for me to understand what's going on!) |
Right now if you run It is like the behaviour of a BinderHub that won't rebuild a repo unless there is a new commit. The user doesn't specify anything. It is up to a content provider to return a "content ID". The local directory content provider doesn't do this so we always rebuild the image (this is fine because if nothing has changed we profit from the caching that docker does). So far we add a timestamp to the end of the docker image name so we have something like If we merge this PR we will have names like |
@betatim we put this in tags in binderhub, right? If so maybe we should do that here too. But we can explore that in a different pr |
Nods, I thought about using tags but then decided not to because the timestamp (current behaviour) isn't in a tag either. I'll change to using tags and write some tests. |
@betatim cool. I've merged this now, can move to tags after :) |
[MRG] Start reusing existing docker images if content hasn't changed
Content providers can specify a "content ID" which is used to identify
versions of the content. The ID is used in the docker image name and if
we find an existing image for a given content ID the build step is
skipped.
(This is also physics @ctb 馃榾)
Closes #452