GitHub user p0039646-bot created a discussion: Feature Request: Enable Podman 
compatibility by removing BUILDPLATFORM dependencies in Dockerfile

I would like to propose a small modification to the main Dockerfile to allow 
Apache Superset to be built seamlessly using Podman. Currently, the use of 
BUILDPLATFORM on lines 23 and 24 creates compatibility issues for Podman users, 
as Podman handles cross-platform builds differently than Docker Buildx.

# The Problem
The current Dockerfile explicitly references BUILDPLATFORM:

[Line 
24](https://github.com/apache/superset/blob/3b75af9ac3b86547a27b6b512323300e75bc387c/Dockerfile#L24)
 : `ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64}`
[Line 
32](https://github.com/apache/superset/blob/3b75af9ac3b86547a27b6b512323300e75bc387c/Dockerfile#L32)
 : `FROM --platform=${BUILDPLATFORM} node:20-bookworm-slim AS superset-node-ci`
While this works for Docker's build kit, it causes build failures in Podman 
environments that do not automatically inject these arguments. This limits the 
ability of developers in restricted or RHEL-based environments (where Podman is 
the standard) to build Superset from source.

# Proposed Change
I suggest removing the explicit --platform=$BUILDPLATFORM flag from the 
Dockerfile.

Scope: Narrow. This only affects the build-time environment variables.

Impact: By removing these lines, the build process becomes engine-agnostic. The 
container engine will simply build for the native architecture of the host 
unless otherwise specified by the user via command-line flags (e.g., 
--platform).

# Implementation Details
1. Open Dockerfile.
2. Locate lines 23 and 24.
3. Remove the $BUILDPLATFORM argument and the associated logic that requires it.
4. Verify that docker build still functions as expected for standard users.

GitHub link: https://github.com/apache/superset/discussions/37792

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to