Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add platform flag to attach command #813

Closed
1 task
SamirPS opened this issue Feb 14, 2023 · 9 comments · Fixed by #1309
Closed
1 task

Add platform flag to attach command #813

SamirPS opened this issue Feb 14, 2023 · 9 comments · Fixed by #1309
Labels
enhancement New feature or request
Milestone

Comments

@SamirPS
Copy link
Contributor

SamirPS commented Feb 14, 2023

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.
@SamirPS SamirPS added the enhancement New feature or request label Feb 14, 2023
@qweeah qweeah added this to the v1.0.0-rc.2 milestone Feb 14, 2023
@qweeah
Copy link
Contributor

qweeah commented Feb 14, 2023

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

@qweeah qweeah modified the milestones: v1.0.0-rc.2, future Feb 16, 2023
@toddysm
Copy link

toddysm commented Feb 23, 2023

@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?

@SamirPS
Copy link
Contributor Author

SamirPS commented Feb 23, 2023

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

@toddysm
Copy link

toddysm commented Feb 23, 2023

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.

@SamirPS
Copy link
Contributor Author

SamirPS commented Feb 23, 2023

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

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale Inactive issues or pull requests label Jul 23, 2023
@SamirPS
Copy link
Contributor Author

SamirPS commented Jul 30, 2023

Any news about this issue?

@qweeah qweeah removed the stale Inactive issues or pull requests label Jul 31, 2023
@qweeah
Copy link
Contributor

qweeah commented Jul 31, 2023

Any news about this issue?

@shizhMSFT @FeynmanZhou @sajayantony for planning

@shizhMSFT
Copy link
Contributor

Linking #834

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants