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

stargzify: stargzifying an image twice results in a broken image #27

Closed
ktock opened this issue Oct 20, 2019 · 0 comments · Fixed by #28
Closed

stargzify: stargzifying an image twice results in a broken image #27

ktock opened this issue Oct 20, 2019 · 0 comments · Fixed by #28

Comments

@ktock
Copy link
Contributor

ktock commented Oct 20, 2019

It is possible for an image to be stargzified twice during the distribution lifecycle, which currently results in a broken image.

Following is OK:

$ stargzify -insecure ubuntu:18.04 http://private:5000/ubuntu:once
$ docker pull private:5000/ubuntu:once

But when we stargzify twice, it results in a broken image:

$ stargzify -insecure http://private:5000/ubuntu:once http://private:5000/ubuntu:twice
$ docker pull private:5000/ubuntu:twice
failed to register layer: Error processing tar file(duplicates of file paths not supported): 

The reason is the name of TOC JSON file("stargz.index.json") isn't reserved and duplicates in the stargzified image.

$ curl http://private:5000/v2/ubuntu/blobs/sha256:479846a1cefdb8af9ace78046a2e3a691ccbf8b018b710cb9fcea7fe0593dd97 | tar -z --list
run/
run/systemd/
run/systemd/container
stargz.index.json
stargz.index.json
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.

1 participant