Skip to content

Feat/download foreign layers#2875

Open
IanEff wants to merge 2 commits into
podman-container-tools:mainfrom
IanEff:feat/download-foreign-layers
Open

Feat/download foreign layers#2875
IanEff wants to merge 2 commits into
podman-container-tools:mainfrom
IanEff:feat/download-foreign-layers

Conversation

@IanEff
Copy link
Copy Markdown

@IanEff IanEff commented May 14, 2026

Add --download-foreign-layers to skopeo copy and skopeo sync.

When set, the flag instructs containers/image to fetch the contents of
nondistributable ("foreign") layers — e.g. Windows base layers — instead
of preserving only a URL reference to their original location. This is
useful for air-gapped copies of images whose upstream source may later
become unreachable.

Note that the underlying copy.Options.DownloadForeignLayers fetches the blob but
does not rewrite the manifest media type or strip the urls field; this
is a known gap in containers/container-libs (originally containers/image#1998).
The integration test and man pages describe what users will actually observe
rather than what the upstream doc-comment promises.

I'll work to close that bug, but this should suffice to close this issue.

Closes #545

@TomSweeneyRedHat
Copy link
Copy Markdown
Contributor

@IanEff this needs a rebase also.

IanEff added 2 commits May 14, 2026 16:38
Signed-off-by: Ian Furst <ian.furst@gmail.com>
Add TestCopyDownloadForeignLayers asserting the user-visible effect of the
flag: the foreign blob is present in blobs/sha256/ when set, absent when
not. Manifest contents are out of scope; the upstream library downloads
the blob but does not rewrite the nondistributable media type or strip the
urls field (a separate gap in containers/container-libs).

Closes podman-container-tools#545
Signed-off-by: Ian Furst <ian.furst@gmail.com>
@IanEff IanEff force-pushed the feat/download-foreign-layers branch from 643cea2 to 275c80b Compare May 14, 2026 20:50
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.

Add an option to copy foreign layers

2 participants