Skip to content

Support copying artifacts across multiple platforms (pick up stale PR #1954) #2163

Closed

Description

@TerryHowe

What is the version of your ORAS CLI

main / 1.3.0

What would you like to be added?

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?

  • Yes, I am willing to implement it.

Activity

  1. Soundcreates commented on Sep 24, 2026

    @Soundcreates
    Contributor

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions