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

question: support for v1layout tarball? #1879

Open
deitch opened this issue Feb 20, 2024 · 0 comments
Open

question: support for v1layout tarball? #1879

deitch opened this issue Feb 20, 2024 · 0 comments
Labels
question Further information is requested

Comments

@deitch
Copy link
Collaborator

deitch commented Feb 20, 2024

The v1/tarball.Write() writes it in docker's unique tarball format. Per the summary:

This package produces tarballs that can consumed via docker load. Note that this is a different format from the legacy tarballs that are produced by docker save, but this package is still able to read the legacy tarballs produced by docker save.

As of docker engine v25, docker save actually writes to OCI layout tarball, i.e.:

$ docker save alpine:3.19 > /tmp/alpine319.tar
$ tar xvf /tmp/alpine319.tar
x blobs/
x blobs/sha256/
x blobs/sha256/a0264d60f80df12bc1e6dd98bae6c43debe6667c0ba482711f0d806493467a46
x blobs/sha256/ace17d5d883e9ea5a21138d0608d60aa2376c68f616c55b0b7e73fba6d8556a3
x blobs/sha256/bca4290a96390d7a6fc6f2f9929370d06f8dfcacba591c76e3d5c5044e7f420c
x blobs/sha256/c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b
x index.json
x manifest.json
x oci-layout

That is almost identical to v1 layout, which GGCR supports, with the exception of:

  • it is in a tar stream, not an actual layout
  • it includes docker's unique manifest.json

FWIW, this is identical to the results of using buildkit with --output type=oci,path=/tmp/foo.tar

Is there a way to output this tar format? In theory, we could output to a directory using layout.Write() and then tar it up, but that is inefficient and could get messed up, and in any case, it all is a tar stream.

@deitch deitch added the question Further information is requested label Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant