[Bug] redefining BUILDPLATFORM when using Podman
Opened this issue · 1 comments
Bug description
The following error occurs:
Error: reading multiple stages: attempted to redefine "BUILDPLATFORM": invalid argument
when using podman with the command:
podman compose -f docker-compose-non-dev.yml up --build
Screenshots/recordings
Superset version
master / latest-dev
Python version
v3.12.6
Node version
v20.18.0
Browser
Firefox
Additional context
Works with Docker, issue only occus with Podman.
OS: macOS Sequoia 15.0.1 arm64
Host: MacBook Pro (16-inch, 2023)
Kernel: Darwin 24.0.0
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
The error you're encountering with Podman seems to be related to the redefinition of the BUILDPLATFORM
variable. This issue arises because Podman handles build arguments differently than Docker, and it doesn't allow redefinition of certain variables like BUILDPLATFORM
.
To resolve this, you can try the following workaround:
-
Modify the Dockerfile: Remove or comment out the line where
BUILDPLATFORM
is defined if it's being redefined. This might look like:# ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64}
-
Use Podman-specific options: If Podman has specific options or flags to handle such cases, consider using them. Unfortunately, Podman might not support all Docker features directly, so checking Podman's documentation for any specific flags or environment variable handling could be helpful.
-
Environment Variables: Ensure that
BUILDPLATFORM
is not being set elsewhere in your environment or scripts that might conflict with Podman's handling.
These steps should help you bypass the issue with Podman. If the problem persists, you might need to look into Podman's documentation or community for more specific guidance on handling build arguments.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other