umoci
umoci copied to clipboard
support pulling images with OCI Distribution Spec API
@cyphar Any reason not to have support for pulling OCI images directly without skopeo?
e.g.
$ skopeo copy docker://alpine:latest oci:/tmp/alpine:latest
$ umoci unpack --image /tmp/alpine /tmp/alpine-bundle
could be written as
$ umoci unpack --image docker://alpine:latest /tmp/alpine-bundle
This could be implemented just like if strings.HasPrefix(imagePath, "docker://") { execSkopeoBinary(...) }
if we don't want to have registry code in this repo.
Yeah originally this wasn't implemented because distribution-spec wasn't finalised at the time (and we had various alternative approaches being discussed at the time). This could be implemented fairly easily by implementing a "remote CAS" interface, though I imagine we'd want something more clever if people are going to use it fairly often. Also there's the question of whether ORAS is going to replace skopeo
as the standard "pull an OCI image" tool.
related: https://github.com/opencontainers/tob/pull/68#issuecomment-766935743