Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to copy from local docker to OCI image? #199

Closed
amitsaha opened this issue Sep 10, 2016 · 7 comments
Closed

Possible to copy from local docker to OCI image? #199

amitsaha opened this issue Sep 10, 2016 · 7 comments

Comments

@amitsaha
Copy link

Hello, I know I can do this:

$ skopeo copy docker://busybox:latest oci:existingemptydirectory

However, can I specify the source as a docker image which is only present locally? Trying it gives me:

$ sudo docker images
REPOSITORY                      TAG                 IMAGE ID            CREATED             SIZE
amitsaha/rootfs-1               latest              bbb478419aa9        7 minutes ago       115.9 MB

$ sudo skopeo copy docker://amitsaha/rootfs-1:latest oci:existingemptydirectory1
FATA[0005] Error reading manifest: error fetching manifest: status code: 401, body: {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Name":"amitsaha/rootfs-1","Action":"pull"}]}]}

If this is not yet available, is there any alternative to directly converting a docker image which is not in any supported registry to an OCI bundle? Thanks for any hints!

@mtrmac
Copy link
Contributor

mtrmac commented Sep 10, 2016

docker: refers to images published on docker registry servers; in this context amitsaha/rootfs-1:latest is read as a shorthand for docker.io/amitsaha/rootfs-1:latest.

Accessing images managed locally by the Docker daemon is being worked on in containers/image, and accessible through https://github.com/mtrmac/skopeo/tree/docker-daemon , using a docker-daemon: transport (e.g. docker-daemon:amitsaha/rootfs-1:latest. This is known to be incomplete, nevertheless testing would be appreciated. A trivial smoke test seems to work.

@amitsaha
Copy link
Author

@mtrmac awesome, going to test this now/soon ish and will report back! Thanks.

@amitsaha
Copy link
Author

@mtrmac tested it just now, seems to be working great!

@mtrmac
Copy link
Contributor

mtrmac commented Nov 2, 2016

Thanks for testing, docker-daemon: support is now merged in master.

@mtrmac mtrmac closed this as completed Nov 2, 2016
@abdennour
Copy link

docker-daemon:<image> not docker-deamon://<image>
i hope this tip is helpful

@mirekphd
Copy link

mirekphd commented Aug 5, 2023

docker-daemon:<image> not docker-deamon://<image>
i hope this tip is helpful

I'd consider making both variants work or documenting this idiosyncrasy / exception.

@mtrmac
Copy link
Contributor

mtrmac commented Aug 7, 2023

docker:// is the exception, really.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2023
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

4 participants