Skip to content

Commit e014a8b

Browse files
fix platform flags (#2245)
Signed-off-by: Prajyot-Parab <[email protected]>
1 parent d451e4c commit e014a8b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

hack/ccm/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
ARG TARGETARCH
18-
1917
# Build IBM cloud controller manager binary
2018
ARG golang_image
21-
FROM ${golang_image} AS ccm-builder
22-
ARG ARCH
19+
FROM --platform=$BUILDPLATFORM ${golang_image} AS ccm-builder
20+
ARG TARGETARCH
2321
ARG POWERVS_CLOUD_CONTROLLER_COMMIT
2422
WORKDIR /build
2523
RUN git clone https://github.com/openshift/cloud-provider-powervs
26-
RUN cd cloud-provider-powervs && git checkout $POWERVS_CLOUD_CONTROLLER_COMMIT && CGO_ENABLED=0 GOARCH=$ARCH go build \
24+
RUN cd cloud-provider-powervs && git checkout $POWERVS_CLOUD_CONTROLLER_COMMIT && CGO_ENABLED=0 GOARCH=$TARGETARCH go build \
2725
-ldflags "-s -w" -o /build/ibm-cloud-controller-manager .
2826

2927
# Assemble the final image

0 commit comments

Comments
 (0)