You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support copying artifacts across multiple platforms (pick up stale PR #1954) #2163
Add support for oras cp --platform to accept multiple comma-separated platforms (e.g. --platform linux/amd64,linux/arm64), instead of only a single platform. Today, omitting --platform copies all platforms in an index, while specifying it accepts only one.
This was previously implemented in #1954 (fixes #1945), which stalled: the author (hellocn9) has been unresponsive for months and the branch had drifted out of date with main.
An up-to-date, conflict-free rebase of that work exists locally (rebased onto oras-project/oras@main at d0da4a9), covering:
feat(copy): Support copying artifacts across multiple platforms.
refactor(copy): Optimize platform copying logic to support multi-platform filtering and error handling
test(copy): add related unit tests and E2E tests for multi-platform copying
refactor(copy): Optimize platform copying logic to support multi-platform filtering
Core changes: cmd/oras/root/cp.go / cp_test.go gain matchesAnyPlatform/platformMatches helpers and multi-platform copy logic in option.Platform, plus new unit tests and an E2E test (test/e2e/suite/command/cp_multiplatform.go).
Since we don't have push access to the original fork to update #1954 directly, opening this issue so someone can pick the feature back up — either by reviving #1954's branch or reimplementing against current main. Original PR is being closed as stale.
Why is this needed for ORAS?
Without this, copying a subset of platforms from a multi-platform image index requires running oras cp once per platform, which is both slower and result in separate single-platform manifests being stored instead of a single combined image index (see discussion in #1945).
Are you willing to submit PRs to contribute to this feature?
The PR adds repeated and comma-separated oras cp --platform support, preserves single-platform behavior, validates platform matches, and includes unit plus E2E coverage. The full suite, race tests, vet, encoding check, and E2E command-package compile all pass. Please take a look when you have time.
Activity
Soundcreates commentedon Sep 24, 2026
Implemented this in PR #2191: #2191
The PR adds repeated and comma-separated oras cp --platform support, preserves single-platform behavior, validates platform matches, and includes unit plus E2E coverage. The full suite, race tests, vet, encoding check, and E2E command-package compile all pass. Please take a look when you have time.