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: append with an empty base and environment vars? #1881

Open
jordan-da opened this issue Feb 22, 2024 · 3 comments · May be fixed by #1882
Open

question: append with an empty base and environment vars? #1881

jordan-da opened this issue Feb 22, 2024 · 3 comments · May be fixed by #1882
Labels
question Further information is requested

Comments

@jordan-da
Copy link

jordan-da commented Feb 22, 2024

I know it's possible to append over an empty base or mutate an existing base with environment vars or append layers to it, but is it possible to append layers and environment vars over an empty base?

For example, something like:

crane mutate --oci-empty-base -e foo=bar --append tarball.tgz -t someregistry/someimage:sometag 

or

crane append --oci-empty-base -e foo=bar -f tarball.tgz -t someregistry/someimage:sometag 
@jordan-da jordan-da added the question Further information is requested label Feb 22, 2024
@jordan-da
Copy link
Author

Slightly related but I noticed that even Ko doesn't really support this?

ko-build/ko#800

Is there is technical reason this is so tricky?

@jordan-da
Copy link
Author

jordan-da commented Feb 22, 2024

maybe what i am asking for is for this to work?

crane mutate scratch -e foo=bar --append tarball.tgz -t  us.gcr.io/my-images/my-image:image
Error: pulling scratch: GET https://index.docker.io/v2/library/scratch/manifests/latest: MANIFEST_UNKNOWN: manifest unknown; unknown tag=latest

@jordan-da jordan-da linked a pull request Feb 22, 2024 that will close this issue
@thesayyn
Copy link
Collaborator

thesayyn commented Mar 4, 2024

You can combine crane append with crane mutate. That's what we do in rules_oci

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

Successfully merging a pull request may close this issue.

2 participants