Skip to content

Add platform flag to attach command #813

Closed

Description

@SamirPS

What is the version of your ORAS CLI

Version: 1.0.0-rc.1+unreleased Go version: go1.20 Git commit: 8bda262 Git tree state: clean

What would you like to be added?

Right now, if I have a multi-arch image, I need this to attach a file to each arch.

oras attach... --oci-layout oci@digestofthearch

I would like to be able to do something like this.

oras attach .... --platform linux/s390x --oci-layout oci:dev 

Why is this needed for ORAS?

Right now, I have a multi-arch image, and it will be more intuitive to attach an artefact to an arch with the platform flag, especially when we can discover and cp with the platform flag.

Are you willing to submit PRs to contribute to this feature?

  • Yes, I am willing to implement it.

Activity

  1. added
    enhancement
    on Feb 14, 2023
  2. added this to the v1.0.0-rc.2 milestone on Feb 14, 2023
  3. qweeah commented on Feb 14, 2023

    @qweeah
    Contributor

    Thanks for providing this great idea. It should be added to oras so user won't need to find the digest of a certain arch by themselves.

    cc @FeynmanZhou

  4. modified the milestones: v1.0.0-rc.2, future on Feb 16, 2023
  5. toddysm commented on Feb 23, 2023

    @toddysm

    @SamirPS I would like to understand a little bit more about your scenario. As far as I understand you would like to attach an artifact to each arch image. My assumption is that you want to build the following structure:

    • multiArch image (this is the manifest index)
      • x86 image (this is the image manifest for x86 image)
        • artifact n:1 attached to the x86 image
      • arm image (this is the image manifest for arm image)
        • artifact n:2 attached to the x86 image

    Is my assumption correct?

  6. SamirPS commented on Feb 23, 2023

    @SamirPS
    Author

    Hello @toddysm
    Yeah, your assumption is correct, just that the artifact n:2 is attached to arm not x86

  7. toddysm commented on Feb 23, 2023

    @toddysm

    Apologies - copy and paste mistake on my side :)

    This is possible right now although it requires a bit more elaborate steps. You should directly attach to the manifest that is for this particular architecture instead to the index manifest. You can easily get that by pulling the index manifest and getting a reference to the arch specific manifest using jq. Let me know if you need more details about how to do that.

    One principle we are trying to follow with ORAS to make it agnostic to the artifacts that are pushed. Using architecture in the command is very specific to container image artifact types and goes against this principle.

    Your request though prompts some interesting ideas for some future capabilities like the following:

    oras attach... --property "architecture: arm" ...
    

    It is a very rough idea, and it will need to go over more thorough design discussions because I can see quite a few issues with this right now that can go wrong.

  8. SamirPS commented on Feb 23, 2023

    @SamirPS
    Author

    You talk about doing

    Oras attach repo:tag@digestofarm for example ? Right now I'm using it.

    And i understand your point of view and yeah I thinks it's will need more discussion

  9. github-actions commented on Jul 23, 2023

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

  10. added
    stale
    on Jul 23, 2023
  11. SamirPS commented on Jul 30, 2023

    @SamirPS
    Author

    Any news about this issue?

  12. removed
    stale
    on Jul 31, 2023
  13. qweeah commented on Jul 31, 2023

    @qweeah
    Contributor

    Any news about this issue?

    @shizhMSFT @FeynmanZhou @sajayantony for planning

  14. shizhMSFT commented on Jul 31, 2023

    @shizhMSFT
    Contributor

    Linking #834

  15. modified the milestones: future, v1.2.0 on Mar 26, 2024
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions