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

question: How to mutate an image's platform #1918

Closed
joshwlewis opened this issue Apr 10, 2024 · 2 comments
Closed

question: How to mutate an image's platform #1918

joshwlewis opened this issue Apr 10, 2024 · 2 comments
Labels
question Further information is requested

Comments

@joshwlewis
Copy link
Contributor

joshwlewis commented Apr 10, 2024

I commonly deal with images that I know were compiled for a specific architecture, but have a blank architecture in the config. This is pretty common for Cloud Native Buildpack buildpack images create via pack buildpack package.

For instance, this image has linux/amd64 compiled binaries in it:

$ crane config heroku/buildpack-nodejs:3.0.3 | jq '.architecture'
""

I'd like to mutate the image config to the appropriate architecture to prevent incorrect usage. I've tried several variations of crane mutate, but the --platform flag doesn't seem to have an impact on the resulting image. For instance, this doesn't mutate the image:

$ crane mutate heroku/buildpack-nodejs:3.0.3 --platform linux/amd64
2024/04/10 14:52:49 existing manifest: 3.0.3@sha256:30da467ff00b5597ad531cdad6b9ca52f86987dfc85da0504a55f3523bd0fd8b
index.docker.io/heroku/buildpack-nodejs@sha256:30da467ff00b5597ad531cdad6b9ca52f86987dfc85da0504a55f3523bd0fd8b

Should crane support this? Or maybe there's some other way to achieve this with crane?

@joshwlewis joshwlewis added the question Further information is requested label Apr 10, 2024
@joshwlewis
Copy link
Contributor Author

I went ahead and opened #1919 as a potential solution.

@joshwlewis
Copy link
Contributor Author

Closing -- support was added in #1919.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant