Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Feature Query: Save docker app as tar.gz file #613

Open
hassanfarid opened this issue Sep 14, 2019 · 6 comments
Open

Feature Query: Save docker app as tar.gz file #613

hassanfarid opened this issue Sep 14, 2019 · 6 comments

Comments

@hassanfarid
Copy link

Context:
As with the following docker commands available for docker images,

docker image save ....
docker image load .....

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,

docker app save .....
docker app load .....
@ndeloof
Copy link
Contributor

ndeloof commented Oct 8, 2019

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

@squarism
Copy link

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.

@danieleades
Copy link

This would be an incredible feature. We currently deploy a docker-compose app in an offline environment in a very bespoke way

@squarism
Copy link

@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 (cnabio/duffle#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. 😞

@danieleades
Copy link

@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!

@dave-yotta
Copy link

dave-yotta commented Jul 14, 2020

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.

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

No branches or pull requests

5 participants