Skip to content

imagetools: add oci-layout support#3721

Merged
tonistiigi merged 5 commits intodocker:masterfrom
tonistiigi:imagetools-oci-layout
Mar 14, 2026
Merged

imagetools: add oci-layout support#3721
tonistiigi merged 5 commits intodocker:masterfrom
tonistiigi:imagetools-oci-layout

Conversation

@tonistiigi
Copy link
Copy Markdown
Member

Add support for oci-layout format in imagetools create and inspect. Same format as named context in build:

oci-layout://<path>[:tag]
oci-layout://<path>[@sha256:...]

Can be used both as a source or target parameter. You can mix oci-layout and registry references as you like.

Verify imagetools copies signatures only for attestation manifests and
does not copy image-manifest signatures or unsupported referrers.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Add oci-layout:// source and target support to imagetools create and
inspect while keeping merge, filter, and referrer logic shared.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Handle OCI layout referrers via subject-annotated index entries and add
integration coverage for copying signed attestations through oci-layout.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
When pushing to an OCI layout where the top-level descriptor
blob already existed, pushOCILayout returned early without
updating index.json or writing pending referrers. Restructure
the control flow so the blob-exists case skips only the write
but still updates the index and flushes referrers.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
FetchReferrers accepted FetchReferrersOpt but dropped them
when resolving OCI layout referrers. Forward the options and
apply ArtifactTypes filtering so callers can narrow results
consistently for both registry and local layout sources.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi force-pushed the imagetools-oci-layout branch from b294aa0 to 863398c Compare March 13, 2026 06:16
@tonistiigi tonistiigi marked this pull request as ready for review March 13, 2026 06:16
@crazy-max crazy-max added this to the v0.33.0 milestone Mar 13, 2026
@tonistiigi tonistiigi merged commit 86381f1 into docker:master Mar 14, 2026
158 checks passed
@crazy-max
Copy link
Copy Markdown
Member

Needs docs follow-up for v0.33.0 (cc @dvdksn)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants