-
Notifications
You must be signed in to change notification settings - Fork 54
feat(*): add digest to invocation image on build #691
base: master
Are you sure you want to change the base?
Conversation
Does this digest replace having to push to a registry? |
Yea, this implementation of digest is decoupled from the registry. You can still push to registry and update the image tag with the registry digest if you want to validate the digest in the image manifest every time you do a docker pull though. @carolynvs |
FYI, the builder test seems to be failing:
|
8ddfcf6
to
140e400
Compare
Fixed those tests and rebased for the updated linter issues so we should be all good now! |
The problem here, is that this digesting algorithm is not the one used by a registry. We can't build a digested reference to the image in the registry out of this :(. I don't see any reasonable solution for that, other than by not using the daemon for pushing the invocation image. |
@simonferquel I did quite a bit of digging into how to mimic the digest that the registry uses but came to the same conclusion as you in that it would be a brittle solution and very complex. The solution in the PR however is not tied to the registry at all. It simply creates a sha256 digest of the of the image tar (replicated locally with I think we're on the same page in that when a remote registry is involved that the push logic for a bundle should push the images and update the image digest. However, it makes most sense to me to make this adjustment in the image reference itself. So update the image for example from something like
Putting the digest that gets computed by the registry in the digest field on the image in the bundle descriptor seems redundant to me. That's why I was looking for a digest that is not tied to the registry at all to also help validate bundles that are developed and packaged locally and moved around without any registry involvement at all. For example, if you build a bundle locally using In that scenario, there should be no need for a registry component but there is a need to Given that context, is there something I am missing or mis-understanding about docker save and registries that you know? |
I can look into implementing digest with the containerd libraries you pointed out to me to attain a digest that doesn't change when changing image repo/name |
resolves #690