Skip to content

Commit

Permalink
Fix BUILDPLATFORM redefinition issue in non-OpenShift Containerfiles
Browse files Browse the repository at this point in the history
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: #120

Signed-off-by: Andrew McDermott <[email protected]>
  • Loading branch information
frobware committed Sep 2, 2024
1 parent 076e261 commit 534da80
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Containerfile.bpfman-agent
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Build the manager binary
ARG BUILDPLATFORM=linux/amd64

FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.22 AS bpfman-agent-build

# The following ARGs are set internally by docker/build-push-action in github actions
Expand Down
2 changes: 0 additions & 2 deletions Containerfile.bpfman-operator
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Build the manager binary
ARG BUILDPLATFORM=linux/amd64

FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.22 AS bpfman-operator-build

ARG BUILDPLATFORM
Expand Down

0 comments on commit 534da80

Please sign in to comment.