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

crane: "invalid tar header" #1838

Open
chyashi opened this issue Nov 3, 2023 · 3 comments
Open

crane: "invalid tar header" #1838

chyashi opened this issue Nov 3, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@chyashi
Copy link

chyashi commented Nov 3, 2023

Describe the bug

I am encountering an "invalid tar header" error when attempting to push a valid Docker image tarball to a container registry using Crane. The source tarball is confirmed to be valid and follows the Docker image archive format, but the issue persists. I have reviewed the code, configuration, and environment without resolution, indicating a potential problem with how Crane is handling the tarball.

To Reproduce

Expected behavior

Additional context

Add any other context about the problem here.

  • Output of crane version
  • Registry used (e.g., GCR, ECR, Quay)
@chyashi chyashi added the bug Something isn't working label Nov 3, 2023
@a-h
Copy link

a-h commented Jan 24, 2024

Without an example of the valid Docker image tarball that's getting the error, I don't see how this could be investigated by anyone else. Have you got a minimal example?

I ran into the same error message, but for a gzipped image. docker load happily loads a gzipped image, but crane requires the tar format. I was wondering whether to do a PR to add support for gzipped output, since that's what's created by the Nix ecosystem's Docker tools.

@lrewega
Copy link

lrewega commented Mar 25, 2024

I was wondering whether to do a PR to add support for gzipped output, since that's what's created by the Nix ecosystem's Docker tools.

I just ran into this precisely. Adding support for gzipped image tarballs would solve for at least one scenario that currently results in this error message.

@jidaojiuyou
Copy link

A similar problem:
https://stackoverflow.com/questions/40622162

in linux, i use crane pull command to pull a image to the *.tar file. then i use crane push command to push the tarball to registry and it is succeed.
but when i use windows to pull the image from registry, the containerd throw a exception: archive/tar: invalid tar header: unknown

is the bug for crane push or crane pull or the tarball file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants