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

Consider skopeo-based adapter #106

Open
kyleam opened this issue Sep 17, 2019 · 3 comments
Open

Consider skopeo-based adapter #106

kyleam opened this issue Sep 17, 2019 · 3 comments

Comments

@kyleam
Copy link
Contributor

kyleam commented Sep 17, 2019

skopeo "is a command line utility that performs various operations on container images and image repositories". It has a copy command to "copy container images between various storage mechanisms".

Here's an example that copies a container from DockerHub to a local OCI-layout directory.

$ skopeo copy docker://busybox:latest oci:bb:latest
Getting image source signatures
Copying blob sha256:7c9d20b9b6cda1c58bc4f9d6c401386786f584437abbe87e58910f8a9a15386b
 742.94 KB / 742.94 KB [====================================================] 0s
Copying config sha256:8cf90cc9e23fce3bb22a95933b0f1008115828369857f09825dfb376b175f897
 575 B / 575 B [============================================================] 0s
Writing manifest to image destination
Storing signatures

$ tree --charset=ascii bb
bb
|-- blobs
|   `-- sha256
|       |-- 7c9d20b9b6cda1c58bc4f9d6c401386786f584437abbe87e58910f8a9a15386b
|       |-- 8cf90cc9e23fce3bb22a95933b0f1008115828369857f09825dfb376b175f897
|       `-- 96fed174fbe8d6aeab995eb9e7fc03a6326abbc25adb5aa598e970dfe8b32c6d
|-- index.json
`-- oci-layout

2 directories, 5 files

I need to look into skopeo more, but here are some things to consider:

  • The above command works without docker installed or the daemon running.

  • Like the docker save output, the OCI layout can be nicely stored and de-duplicated as annex content in the dataset.

  • The above layout should still work with a solution to attach URLs to individual layers (Provide URLs to individual docker image layers #98).

    Edit: Taking a slightly closer look I'm not sure, so s/should/might/.

  • This may help with podman integration (Support 'podman' #89) since IIUC podman still works from a local store of containers and we'd need a similar save/load adapter.

  • Similar to the command above, we should be able to copy from the dataset directory to the local daemon storage.

  • One of the motivations of the docker adapter is lack of singularity support on Windows, so we probably wouldn't be able to completely replace the current approach with skopeo, which I don't think has any Windows support. And docker load doesn't support the OCI layout (there's a draft PR from February),

  • skopeo would be an optional dependency.

  • skopeo isn't yet packaged for Debian.

@yarikoptic
Copy link
Member

Interesting! Google says that singularity 3.1.0 announced full compliance with oci ... May be indeed we could just store oci and compose necessary to the actual solution (docker, singularity) images "on the fly".

@yarikoptic
Copy link
Member

@mih
Copy link
Member

mih commented Sep 29, 2019

DEB packages are available from http://ppa.launchpad.net/projectatomic

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

Successfully merging a pull request may close this issue.

3 participants