Skip to content

Conversation

@Madeeks
Copy link

@Madeeks Madeeks commented Oct 12, 2025

Support for zstd layers was introduced with commit 4d843dc, however the current implementation assumes that all layers in the image have the same media type (.layers[0].mediaType).

When importing images which have mixed layer types (e.g. gzip compression and zstd compression), this behavior causes layer extraction to fail, since layers with a type different from the first one are not pre-processed properly.

This PR addresses the issue by:

  1. saving the manifest content into a variable instead of consuming it immediately to parse blob digests and media types
  2. passing the manifest content to the docker::_download_extract function
  3. having each blob extract its own media type from the manifest in the docker::_download_extract function

This is an alternative implementation to the one in #250.
This strategy removes the need to handle an array for media types in docker::_download() (e.g. parsing from manifest, pruning out entries for cached layers, more complex call to GNU parallel), at the cost of storing the image manifest content in a string variable.

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 this pull request may close these issues.

1 participant