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

--platform parameter spills out of its FROM clause #5968

Open
syedriko opened this issue Feb 4, 2025 · 2 comments · May be fixed by #5971
Open

--platform parameter spills out of its FROM clause #5968

syedriko opened this issue Feb 4, 2025 · 2 comments · May be fixed by #5971
Labels
jira Issues which will be sync'd to a card at https://issues.redhat.com/projects/RUN

Comments

@syedriko
Copy link

syedriko commented Feb 4, 2025

I have an image built on linux/amd64 that I need to use as a base, on amd64 and arm64. I am treating that image as data-only and simply need to copy some files from it to the resulting image. I was hoping the following would work:

ARG LIGHTSPEED_RAG_CONTENT_IMAGE=quay.io/openshift-lightspeed/lightspeed-rag-content@sha256:3e96332648a6f8ff1879c7ae11c818ea7f1c8d5b8a99c4bff406c98c8a7d4541
FROM --platform=linux/amd64 ${LIGHTSPEED_RAG_CONTENT_IMAGE} as lightspeed-rag-content
FROM registry.redhat.io/ubi9/ubi-minimal:latest
COPY --from=lightspeed-rag-content /rag/vector_db/ocp_product_docs ./vector_db/ocp_product_docs
RUN uname -m

, but it doesn't - on arm64, the

FROM registry.redhat.io/ubi9/ubi-minimal:latest

line picks up the amd64 flavor of the UBI9 base image.

flouthoc added a commit to flouthoc/buildah that referenced this issue Feb 4, 2025
On processing of every stage platform spec in systemcontext must be
correctly reset.

[NO NEW TESTS NEEDED]

Closes: containers#5968

Signed-off-by: flouthoc <[email protected]>
@flouthoc
Copy link
Collaborator

flouthoc commented Feb 4, 2025

PR #5971 should close this.

flouthoc added a commit to flouthoc/buildah that referenced this issue Feb 4, 2025
On processing of every stage platform spec in systemcontext must be
correctly reset.

[NO NEW TESTS NEEDED]

Closes: containers#5968

Signed-off-by: flouthoc <[email protected]>
@syedriko
Copy link
Author

syedriko commented Feb 5, 2025

For completeness' sake, I'm doing

FROM --platform=$BUILDPLATFORM registry.redhat.io/ubi9/ubi-minimal:latest

as a workaround for now.

flouthoc added a commit to flouthoc/buildah that referenced this issue Feb 6, 2025
On processing of every stage platform spec in systemcontext must be
correctly reset.

[NO NEW TESTS NEEDED]

Closes: containers#5968

Signed-off-by: flouthoc <[email protected]>
@flouthoc flouthoc added the jira Issues which will be sync'd to a card at https://issues.redhat.com/projects/RUN label Feb 10, 2025
flouthoc added a commit to flouthoc/buildah that referenced this issue Feb 11, 2025
On processing of every stage platform spec in systemcontext must be
correctly reset.

[NO NEW TESTS NEEDED]

Closes: containers#5968

Signed-off-by: flouthoc <[email protected]>
flouthoc added a commit to flouthoc/buildah that referenced this issue Feb 11, 2025
Every stage now has its own copy of systemcontext.

On processing of every stage platform spec in systemcontext must be
correctly reset.

Closes: containers#5968

Signed-off-by: flouthoc <[email protected]>
flouthoc added a commit to flouthoc/buildah that referenced this issue Feb 11, 2025
Every stage now has its own copy of systemcontext.

On processing of every stage platform spec in systemcontext must be
correctly reset.

Closes: containers#5968

Signed-off-by: flouthoc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira Issues which will be sync'd to a card at https://issues.redhat.com/projects/RUN
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants