Open hassanfarid opened 4 years ago
Sounds like a reasonable feature request, main question I can see here is how to handle image references in the bundle, as they have to target the same registry/repository hosting the bundle. Maybe this can be considered once relocation map has been implemented cc @silvin-lubecki
CNAB has a concept of thick bundles. 🌻 Perfect. I don't know if docker app has this concept implemented, considered or exposed to the user. https://github.com/deislabs/cnab-spec/blob/master/104-bundle-formats.md Docker app would just need to write out the images in the OCI image format as described in this link. I don't know exactly how this would be done yet but there are CNAB to OCI dependencies in this project. Maybe it's possible to write an OCI image out without too many project changes or more dependencies.
This would be an incredible feature. We currently deploy a docker-compose app in an offline environment in a very bespoke way
@danieleades Same here. We had to invent a format. Unknown if it will stand the test of time. I looked at duffle
(which maybe you could look at too). The short story, from what I can tell, is that this problem is harder than it seems. I though docker layers were docker layers (whatever SHA sum would be the same). But apparently (https://github.com/cnabio/duffle/issues/828) some bit of this is coupled to a registry. I really don't know why. Whatever duffle is trying to do by having local images, is basically what I'm trying to do too.
Apparently the cnab-to-oci project has the same issue. I definitely see the issue when dealing with namespaced/pushed images but I don't see it with the completely offline use case (which might be too myopic). As in, what's the point of solving it for offline when it won't work with a registry? But then, why can't we just have a flag?
A big workaround is to push to the registry first. Then I got duffle to work but I didn't like the flow. So I went with the bespoke way. 😞
@squarism I've been toying with using a local registry spun up in a docker container, and then carrying that around with me. Just seems convoluted though. Will take a look at duffle!
We're using save/load to make build artifacts of docker images which may be tested or deployed later. Docker app / CNAB solves the service composition problem in any environment (test/QA/live etc). But without docker app save/load, pushing to a registry (the only other option) would mean thousands of images a day, hundreds of mb each being put in the registry - most to be abandoned.
Context: As with the following docker commands available for docker images,
Ref links:
These commands allow to save or load an image from or to tar.gz file. This file is portable package, and can be used in offline environments.
Question: Do we have the same functionality for CNAB? So that application bundles can be saved as offline file and loaded in target environment without internet or local remote repository access?
Something like,