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 @@ -29,12 +29,25 @@ WORKDIR /usr/src/k8s-rdma-shared-dp
2929RUN make clean && \
3030 make build
3131
32- FROM nvcr.io/nvidia/doca/doca:3.1.0-base-rt-host
32+ FROM alpine:3 AS pkgs
33+ RUN apk add --no-cache hwdata-pci=0.395-r0 kmod=34.2-r0
34+
35+
36+ FROM nvcr.io/nvidia/distroless/go:v3.1.12-dev
37+
38+ # hadolint ignore=DL3002
39+ USER 0:0
40+
41+ SHELL ["/busybox/sh" , "-c" ]
42+ # hadolint ignore=DL4005
43+ RUN ln -s /busybox/sh /bin/sh
44+
3345COPY --from=builder /usr/src/k8s-rdma-shared-dp/build/k8s-rdma-shared-dp /bin/
3446COPY . /src
3547
36- RUN apt-get update && apt-get install -y --no-install-recommends kmod=29-1ubuntu1 && \
37- rm -rf /var/lib/apt/lists/*
48+ RUN mkdir -p /usr/share/hwdata
49+ COPY --from=pkgs /usr/share/hwdata/pci.ids /usr/share/hwdata/pci.ids
50+ COPY --from=pkgs /sbin/lsmod /sbin/lsmod
3851
3952LABEL io.k8s.display-name="RDMA Shared Device Plugin"
4053
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ test-coverage: test-coverage-tools | ; $(info running coverage tests...) @ ## R
110110# Container image
111111.PHONY : image ubi-image
112112image : | ; $(info Building Docker image...) # # Build conatiner image
113- $(IMAGE_BUILDER ) build --progress=plain -t $(TAG ) -f $(DOCKERFILE ) GOPROXY=" $( GOPROXY) " $(CURDIR ) $(IMAGE_BUILD_OPTS )
113+ $(IMAGE_BUILDER ) build --progress=plain -t $(TAG ) -f $(DOCKERFILE ) --build-arg GOPROXY=" $( GOPROXY) " $(CURDIR ) $(IMAGE_BUILD_OPTS )
114114
115115ubi-image : DOCKERFILE=$(CURDIR ) /Dockerfile.ubi
116116ubi-image : TAG=mellanox/k8s-rdma-shared-dev-plugin-ubi
You can’t perform that action at this time.
0 commit comments