Skip to content

Commit 5b87651

Browse files
Merge pull request #98 from rollandf/dockerargbp
2 parents 9e1170c + 76dd405 commit 5b87651

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

Dockerfile.nvidia

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#
1515
# SPDX-License-Identifier: Apache-2.0
1616

17+
ARG BASE_IMAGE_DOCA_BASE_RT_HOST
18+
1719
FROM golang:1.23 AS builder
1820

1921
ARG GOPROXY
@@ -24,7 +26,7 @@ COPY . .
2426
RUN make _build-manager BIN_PATH=build/_output/cmd
2527
RUN make _build-sriov-network-operator-config-cleanup BIN_PATH=build/_output/cmd
2628

27-
FROM nvcr.io/nvidia/doca/doca:3.1.0-base-rt-host
29+
FROM ${BASE_IMAGE_DOCA_BASE_RT_HOST:-nvcr.io/nvidia/doca/doca:3.1.0-base-rt-host}
2830
USER 65532:65532
2931
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/manager /usr/bin/sriov-network-operator
3032
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/sriov-network-operator-config-cleanup /usr/bin/sriov-network-operator-config-cleanup

Dockerfile.sriov-network-config-daemon.nvidia

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#
1515
# SPDX-License-Identifier: Apache-2.0
1616

17+
ARG BASE_IMAGE_DOCA_BASE_RT_HOST
18+
1719
FROM golang:1.23 AS builder
1820

1921
ARG GOPROXY
@@ -23,7 +25,7 @@ WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
2325
COPY . .
2426
RUN make _build-sriov-network-config-daemon BIN_PATH=build/_output/cmd
2527

26-
FROM nvcr.io/nvidia/doca/doca:3.1.0-base-rt-host
28+
FROM ${BASE_IMAGE_DOCA_BASE_RT_HOST:-nvcr.io/nvidia/doca/doca:3.1.0-base-rt-host}
2729
ARG MSTFLINT=mstflint
2830
# We have to ensure that pciutils is installed. This package is needed for mstfwreset to succeed.
2931
# xref pkg/vendors/mellanox/mellanox.go#L150

Dockerfile.webhook.nvidia

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#
1515
# SPDX-License-Identifier: Apache-2.0
1616

17+
ARG BASE_IMAGE_DOCA_BASE_RT_HOST
18+
1719
FROM golang:1.23 AS builder
1820

1921
ARG GOPROXY
@@ -23,7 +25,7 @@ WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
2325
COPY . .
2426
RUN make _build-webhook BIN_PATH=build/_output/cmd
2527

26-
FROM nvcr.io/nvidia/doca/doca:3.1.0-base-rt-host
28+
FROM ${BASE_IMAGE_DOCA_BASE_RT_HOST:-nvcr.io/nvidia/doca/doca:3.1.0-base-rt-host}
2729
USER 65532:65532
2830
LABEL io.k8s.display-name="sriov-network-webhook" \
2931
io.k8s.description="This is an admission controller webhook that mutates and validates customer resources of sriov network operator."

0 commit comments

Comments
 (0)