-
Notifications
You must be signed in to change notification settings - Fork 13
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
Incompatibility with Podman: "attempted to redefine 'BUILDPLATFORM'" Error in Multi-Stage Build #120
Milestone
Comments
frobware
added a commit
to frobware/bpfman-operator
that referenced
this issue
Sep 2, 2024
Removed the hardcoded `ARG BUILDPLATFORM=linux/amd64` from `Containerfile.bpfman-agent` and `Containerfile.bpfman-operator`. This change addresses an issue where Podman fails to build the images if `BUILDPLATFORM` is redefined. By removing the redefinition, the build process is made compatible with Podman. This change remains compatible with Docker, which is more lenient with ARG redefinitions. Fixes: bpfman#120 Signed-off-by: Andrew McDermott <[email protected]>
frobware
added a commit
to frobware/bpfman-operator
that referenced
this issue
Sep 2, 2024
Removed the hardcoded `ARG BUILDPLATFORM=linux/amd64` from `Containerfile.bpfman-agent` and `Containerfile.bpfman-operator`. This change addresses an issue where Podman fails to build the images if `BUILDPLATFORM` is redefined. By removing the redefinition, the build process is made compatible with Podman. This change remains compatible with Docker, which is more lenient with ARG redefinitions. Fixes: bpfman#120 Signed-off-by: Andrew McDermott <[email protected]>
frobware
added a commit
to frobware/bpfman-operator
that referenced
this issue
Sep 3, 2024
Removed the hardcoded `ARG BUILDPLATFORM=linux/amd64` from `Containerfile.bpfman-agent` and `Containerfile.bpfman-operator`. This change addresses an issue where Podman fails to build the images if `BUILDPLATFORM` is redefined. By removing the redefinition, the build process is made compatible with Podman. This change remains compatible with Docker, which is more lenient with ARG redefinitions. Fixes: bpfman#120 Signed-off-by: Andrew McDermott <[email protected]>
frobware
added a commit
to frobware/bpfman-operator
that referenced
this issue
Sep 3, 2024
Removed the hardcoded `ARG BUILDPLATFORM=linux/amd64` from `Containerfile.bpfman-agent` and `Containerfile.bpfman-operator`. This change addresses an issue where Podman fails to build the images if `BUILDPLATFORM` is redefined. By removing the redefinition, the build process is made compatible with Podman. This change remains compatible with Docker, which is more lenient with ARG redefinitions. Fixes: bpfman#120 Signed-off-by: Andrew McDermott <[email protected]>
frobware
added a commit
to frobware/bpfman-operator
that referenced
this issue
Sep 5, 2024
Removed the hardcoded `ARG BUILDPLATFORM=linux/amd64` from `Containerfile.bpfman-agent{.openshift}` and `Containerfile.bpfman-operator{.openshift}`. This change addresses an issue where Podman fails to build the images if `BUILDPLATFORM` is redefined. By removing the redefinition, the build process is made compatible with Podman. This change remains compatible with Docker, which is more lenient with ARG redefinitions. Fixes: bpfman#120 Signed-off-by: Andrew McDermott <[email protected]>
frobware
added a commit
to frobware/bpfman-operator
that referenced
this issue
Sep 5, 2024
Removed the hardcoded `ARG BUILDPLATFORM=linux/amd64` from `Containerfile.bpfman-agent{.openshift}` and `Containerfile.bpfman-operator{.openshift}`. This change addresses an issue where Podman fails to build the images if `BUILDPLATFORM` is redefined. By removing the redefinition, the build process is made compatible with Podman. This change remains compatible with Docker, which is more lenient with ARG redefinitions. Fixes: bpfman#120 Signed-off-by: Andrew McDermott <[email protected]>
frobware
added a commit
to frobware/bpfman-operator
that referenced
this issue
Sep 6, 2024
Removed the hardcoded `ARG BUILDPLATFORM=linux/amd64` from `Containerfile.bpfman-agent{.openshift}` and `Containerfile.bpfman-operator{.openshift}`. This change addresses an issue where Podman fails to build the images if `BUILDPLATFORM` is redefined. By removing the redefinition, the build process is made compatible with Podman. This change remains compatible with Docker, which is more lenient with ARG redefinitions. Fixes: bpfman#120 Signed-off-by: Andrew McDermott <[email protected]>
frobware
added a commit
to frobware/bpfman-operator
that referenced
this issue
Sep 6, 2024
Removed the hardcoded `ARG BUILDPLATFORM=linux/amd64` from `Containerfile.bpfman-agent{.openshift}` and `Containerfile.bpfman-operator{.openshift}`. This change addresses an issue where Podman fails to build the images if `BUILDPLATFORM` is redefined. By removing the redefinition, the build process is made compatible with Podman. This change remains compatible with Docker. Fixes: bpfman#120 Signed-off-by: Andrew McDermott <[email protected]>
msherif1234
pushed a commit
to msherif1234/bpfman-operator
that referenced
this issue
Dec 17, 2024
…s/ocp-bpfman-agent chore(deps): update ocp-bpfman-agent to 47580b4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm encountering an issue when building the
bpfman-operator
andbpfman-agent
image using Podman. The build fails with the following error message:This issue arises due to the redefinition of the
BUILDPLATFORM
argument in theContainerfile.bpfman-operator
(and inContainerfile.bpfman-agent
. The Containerfile* currently definesARG BUILDPLATFORM
twice: once globally at the top of the file and again within thebpfman-operator-build
stage. While Docker allows this without issue, Podman is stricter about argument redefinition, resulting in a build failure.Steps to Reproduce:
5.2.1
(or similar).make build-images OCI_BIN=podman
.If I use docker the build completes OK:
Expected Behaviour:
The image should build successfully without errors, as it does when using Docker.
Proposed Solution:
To resolve this issue, I suggest removing the global
ARG BUILDPLATFORM=linux/amd64
declaration at the top of theContainerfile.bpfman-{agent,operator}
. This will allow the build process to pass in theBUILDPLATFORM
value as needed without causing a conflict.The text was updated successfully, but these errors were encountered: