Conversation
aa77c69 to
3cc2c35
Compare
I'm 50/50 on this (vs. having a |
lib/common/common.go
Outdated
There was a problem hiding this comment.
When a layer's rootfs is empty it's not a valid tar file in files generated by docker save so NewCompressedTarReader will fail. In that case, ignoring the error will result in an ACI with a manifest and an empty rootfs directory, which is what we want.
I can add a better comment.
Adds support for converting Docker images generated by "docker save". Since this file can include several images and tags, we convert whatever image is there if there's only one or we politely ask the user to select one image if there're several. This also changes docker2aci's interface. We now require the prefix "docker://" to get images from a Docker registry and assume that if it's not present the user means a local file.
This makes ACI's app name more consistent with Docker.
93087e6 to
6117125
Compare
Yeah, I'm also on the fence about that. I implemented it this way to keep it simple: adding a --from-file is less convenient for what I think would be a pretty common use case. Since we're already using this syntax in Rocket it seemed a pretty good choice. I don't really know if converting from local images will be the most common use case, probably not. We also have to think whether we want rocket to support converting files generated by |
|
Thanks a lot for the review! |
Add description and example of converting "docker save" files.
6117125 to
60f74d2
Compare
I don't think this is necessary, if people really have exported Docker images around it seems reasonable to expect them to use |
@philips any feelings on this? |
|
@jonboulle @iaguis Can you provide a CLI example. I am having a hard time following. |
vs. (like rkt) |
|
I see. The other option is to just always make it a url like file://etcd |
|
Sure, I consider ./ a minor optimisation over that |
|
Yea, we just need to be explicit. The current state in rkt bothers and we need to fix it because the rules are ambiguous and can lead to mistakes or confusion. This is a stupid example: |
|
@philips agreed, it just hasn't bothered me personally enough yet to On Tue, Mar 31, 2015 at 10:20 PM, Brandon Philips [email protected]
|
|
@jonboulle Yes: rkt/rkt#715 |
|
danke! On Tue, Mar 31, 2015 at 10:37 PM, Brandon Philips [email protected]
|
|
I propose we land this as-is and can revisit the exact UX after we sort it out in rkt, @philips that sound reasonable to you? |
|
@jonboulle Sure, go for it. |
docker2aci: convert local images
Adds support for converting Docker images generated by "docker save".
Since this file can include several images and tags, we convert whatever
image is there if there's only one or we politely ask the user to select
one image if there're several.
This also changes docker2aci's interface. We now require the prefix
"docker://" to get images from a Docker registry and assume that if it's
not present the user means a local file.
Depends on #36
Fixes #32