Skip to content

cpio: add FromLayers for multi-layer CPIO archives#2216

Merged
a-crate merged 1 commit into
chainguard-dev:mainfrom
a-crate:cpio-multiple-layers
May 12, 2026
Merged

cpio: add FromLayers for multi-layer CPIO archives#2216
a-crate merged 1 commit into
chainguard-dev:mainfrom
a-crate:cpio-multiple-layers

Conversation

@a-crate
Copy link
Copy Markdown
Member

@a-crate a-crate commented May 5, 2026

Extract recordsFromLayer helper and add FromLayers function that
converts multiple container layers into a single CPIO archive with
a shared dedup writer.

🤖 Generated with Claude Code

@a-crate a-crate force-pushed the cpio-multiple-layers branch from 179041f to d7ed5d4 Compare May 5, 2026 21:06
@a-crate
Copy link
Copy Markdown
Member Author

a-crate commented May 5, 2026

cpio.FromLayer can't really be called in a reasonable way in succession because it writes the trailer record. Callers would have to call it, drop the trailer record, and then call again. This just gives them a function that makes more sense.

@a-crate a-crate marked this pull request as ready for review May 7, 2026 18:18
@a-crate a-crate requested a review from a team May 7, 2026 18:19
Comment thread pkg/cpio/layer.go
@a-crate a-crate force-pushed the cpio-multiple-layers branch from d7ed5d4 to fa157fd Compare May 12, 2026 17:30
Extract recordsFromLayer helper and add FromLayers function that
converts multiple container layers into a single CPIO archive with
a shared dedup writer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@a-crate a-crate force-pushed the cpio-multiple-layers branch from fa157fd to 9fe92bb Compare May 12, 2026 17:31
@a-crate a-crate requested a review from justinvreeland May 12, 2026 17:32
@a-crate a-crate enabled auto-merge (squash) May 12, 2026 17:32
@a-crate a-crate merged commit 3e9c1ec into chainguard-dev:main May 12, 2026
25 checks passed
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