cnabio / duffle

CNAB installer
https://duffle.sh
MIT License
376 stars 54 forks source link

duffle push should also push all referenced images #734

Open radu-matei opened 5 years ago

radu-matei commented 5 years ago

681 adds initial support for pushing and pulling bundles to OCI registries, using docker/cnab-to-oci.

However, the current implementation of docker/cnab-to-oci only copies the referenced images to the new repository, and does not also push them if they are only local.

Now, the question is: should duffle build, duffle push, or other tooling be responsible for pushing all referenced images?

jeremyrickard commented 5 years ago

I think duffle push should do this, and handle updating the bundle.json with appropriate digests. #690 says to do this during duffle build but I think this really should only happen when a bundle is published. I'd be in favor of making that happen here.

glyn commented 5 years ago

@jeremyrickard I'd like to understand why this is in the Duffle 1.0 milestone as we won't know what the spec for duffle push should be until the CNAB registries spec is complete.

radu-matei commented 5 years ago

I agree that this is not a requirement for 1.0, but at the same time, given the WIP in cnab-to-oci related to adding a relocation map and storing the entire bundle (see https://github.com/docker/cnab-to-oci/tree/relocation-map), I'd prefer to keep a close eye on this.

If you have a strong preference towards removing this from the milestone, feel free to.

jeremyrickard commented 5 years ago

Sorry, overzealous on my milestone applying. I meant to just comment on this and add test. Removed the milestone.

glyn commented 5 years ago

Thanks. (I don't mind if this happens to go into the milestone so long as we don't hold the milestone up waiting for this.)

jeremyrickard commented 5 years ago

I think it would be cool if we got the assorted push related enhancements in for 1.0, but I also want to be realistic. I hadn't added the others, but I agree with @radu-matei that I'd like to keep an eye on them. He and @silvin-lubecki have been hacking away on cnab-to-oci to hopefully figure out what the spec should look like. We implemented a push like capability in Porter with the current state of cnab-to-oci and it's quite useful to be able to share bundles so hopefully we get there sooner, rather than later.

radu-matei commented 4 years ago

Ref: https://github.com/docker/cnab-to-oci/pull/76