-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
fix(dockerfile): podman compose compatibility with BUILDPLATFORM #31489
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, thanks for contributing it! Is there a risk / what size risk of breaking changes for someone who uses the current variable name in a workflow? If significant, I would say let's merge this during the upcoming breaking window (I think it would be excessive to say this requires a vote). If not, we can merge now IMO. |
@@ -21,12 +21,12 @@ | |||
ARG PY_VER=3.10-slim-bookworm | |||
|
|||
# If BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise). | |||
ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64} | |||
ARG TARGET_BUILDPLATFORM=${BUILDPLATFORM:-amd64} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would ARG TARGET_BUILDPLATFORM=${TARGET_BUILDPLATFORM:-${BUILDPLATFORM:-amd64}}
be better? - haven't tested it?
I think it would provide a default if somehow both TARGET_BUILDPLATFORM
and BUILDPLATFORM
are not in context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mistercrunch - I can confirm that it does work, although I'm not sure if it's necessary. TARGET_BUILDPLATFORM
was just a name I made up with the sole reason being that it's a different name to BUILDPLATFORM
. Apologies if I've misunderstood though. Happy to make the change regardless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh why can't you use BUILDPLATFORM
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From #31488 - podman gives this error:
I did a bit of research and this should not be an issue AFAICT. Especially if Looked a bit into podman, seems interesting but not sure whether it'd be beneficial for us to use as our build engine. |
Still on the fence but would require a line in |
Thanks @mistercrunch (and @sfirke) - it doesn't look like podman is that widely used by users of apache/superset anyway (I only found 1-2 posts on it) so I'm happy to let this sit until more users are using podman + running into the issue (or just close the PR) and work off a fork. |
SUMMARY
Fixes #31488.
Using a different variable,
TARGET_BUILDPLATFORM
, inside theDockerfile
to avoid name conflict/redefiningBUILDPLATFORM
which is an issue in podman.ARG TARGET_BUILDPLATFORM=${BUILDPLATFORM:-amd64}
TESTING INSTRUCTIONS
Run the command
and observe that the error
Is no longer there.
ADDITIONAL INFORMATION