Skip to content

Conversation

@DomAyre
Copy link
Contributor

@DomAyre DomAyre commented Jan 18, 2026

Why

As of

we started loading all layers of an image into memory. This massively increased memory usage making out of memory crashes far more likely. This PR fixes that issue by restoring the one pass, no layers in memory architecture.

How

  • Define types for each type of config file we can expect to find in a docker image
  • When iterating through files in the image:
    • If it's a tar file treat it as a layer
    • Otherwise attempt to parse it as one of these config files (keep these in memory since they're a small fixed size)
  • Once all files have been parsed, detect the schema and construct the mapping from layer idx to digest and path
  • Add some tests for common images in MCR (for stability) testing both the hashes are correct and they're calculated in a time and memory budget

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.

2 participants