File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 3030 registry-username : ${{ secrets.NVCR_USERNAME }}
3131 registry-token : ${{ secrets.NVCR_TOKEN }}
3232 cicd-gh-token : ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
33+ goproxy : ${{ secrets.GO_PROXY_URL }}
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515FROM --platform=$BUILDPLATFORM golang:1.23.4 AS builder
16+
17+ ARG GOPROXY
18+ ENV GOPROXY=$GOPROXY
19+
1620ARG TARGETPLATFORM
1721ARG TARGETARCH
1822ARG TARGETVARIANT
@@ -28,17 +32,25 @@ RUN apt-get update && \
2832 GOOS=linux GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT} make clean && \
2933 GOOS=linux GOARCH=${TARGETARCH} GOARM=${TARGETVARIANT} make build
3034
31- FROM nvcr.io/nvidia/doca/doca:3.0.0-base-rt-host
35+ FROM alpine:3 AS pkgs
36+ RUN apk add --no-cache hwdata-pci kmod
37+
38+ FROM nvcr.io/nvidia/distroless/go:v3.1.12-dev
39+
40+ USER 0:0
41+ SHELL ["/busybox/sh", "-c"]
42+ RUN ln -s /busybox/sh /bin/sh
3243
3344ARG TARGETPLATFORM
3445ARG TARGETARCH
3546ARG TARGETVARIANT
3647
3748COPY --from=builder /usr/src/sriov-network-device-plugin/build/sriovdp /usr/bin/
38- WORKDIR /
49+ RUN mkdir -p /usr/share/hwdata
50+ COPY --from=pkgs /usr/share/hwdata/pci.ids /usr/share/hwdata/pci.ids
51+ COPY --from=pkgs /sbin/lsmod /sbin/lsmod
3952
40- RUN apt-get update && apt-get install -y --no-install-recommends kmod=29-1ubuntu1 && \
41- rm -rf /var/lib/apt/lists/*
53+ WORKDIR /
4254
4355COPY --from=builder /usr/src/sriov-network-device-plugin ./src
4456
You can’t perform that action at this time.
0 commit comments