image: wrong mediatypes when blob is already present at destination
When copying an image, the media type of a given blob can be wrong when the a blob with the same digest is already present at the destination. Ultimately, TryReusingBlob and semantics behind (including the caches) only care about digests but they do not take the media types into consideration.
I think we need to lift setting media types on a higher level and not embed that in each individual BlobInfo. Currently, the API doesn’t allow for specifying the compression on the granularity of layers but only for the entire image. That’s something we could (should?) make use of when updating the manifest.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 16 (5 by maintainers)
Commits related to this issue
- add --squash to remediate buildah bug https://github.com/containers/image/issues/733 — committed to nazarewk-iac/buildah-arm64 by nazarewk 4 years ago
- add --squash to remediate buildah bug https://github.com/containers/image/issues/733 — committed to nazarewk-iac/rpi-container-image-builder by nazarewk 4 years ago
- add --squash to remediate buildah bug https://github.com/containers/image/issues/733 — committed to nazarewk-iac/external-dns-arm64 by nazarewk 4 years ago
Any updates on this?
Friendly after the holidays
ping.I just had this issue again (or at least the issue described in my comment above with podman, and rebuilding & repushing with --format docker did seem to fix the issue, but that is a sample size of 1.
This issue is the only pain with using buildah sadly 😢 Everything else works great. I have to rebuild and change the tag everytime this happens.
Sadly the --squash option doesn’t work for me either when e.g.
trying to use image:latest in k3s still fails when trying to pull it from the registry with the known error:
archive/tar: invalid tar header: unknown. Using image:1.0.0 works though.--no-cachedoes not help me whereas--squash-allhelped me resolving this issue and getting rid of the problematic blob. It’s a workaround however.