From 7c5ed8157b19fd7ea960d35957d986971aa2b939 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 16 Jan 2025 14:17:39 +0100 Subject: [PATCH] [no-relnote] Fix Dockerfile lint issues Signed-off-by: Evan Lezar --- deployments/container/Dockerfile.ubi8 | 10 ++++++---- deployments/container/Dockerfile.ubuntu | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/deployments/container/Dockerfile.ubi8 b/deployments/container/Dockerfile.ubi8 index 538b51be..08e41e28 100644 --- a/deployments/container/Dockerfile.ubi8 +++ b/deployments/container/Dockerfile.ubi8 @@ -15,7 +15,7 @@ ARG GOLANG_VERSION=x.x.x ARG VERSION="N/A" -FROM nvidia/cuda:12.6.3-base-ubi8 as build +FROM nvidia/cuda:12.6.3-base-ubi8 AS build RUN yum install -y \ wget make git gcc \ @@ -36,8 +36,8 @@ RUN set -eux; \ | tar -C /usr/local -xz -ENV GOPATH /go -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH +ENV GOPATH=/go +ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH WORKDIR /build COPY . . @@ -62,7 +62,8 @@ WORKDIR /artifacts/packages ARG PACKAGE_VERSION ARG TARGETARCH -ENV PACKAGE_ARCH ${TARGETARCH} +ENV PACKAGE_ARCH=${TARGETARCH} + RUN PACKAGE_ARCH=${PACKAGE_ARCH/amd64/x86_64} && PACKAGE_ARCH=${PACKAGE_ARCH/arm64/aarch64} && \ yum localinstall -y \ ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1-1.*.rpm \ @@ -75,6 +76,7 @@ COPY --from=build /artifacts/bin /work ENV PATH=/work:$PATH +ARG VERSION LABEL io.k8s.display-name="NVIDIA Container Runtime Config" LABEL name="NVIDIA Container Runtime Config" LABEL vendor="NVIDIA" diff --git a/deployments/container/Dockerfile.ubuntu b/deployments/container/Dockerfile.ubuntu index ce28f363..d71e33e9 100644 --- a/deployments/container/Dockerfile.ubuntu +++ b/deployments/container/Dockerfile.ubuntu @@ -15,7 +15,7 @@ ARG GOLANG_VERSION=x.x.x ARG VERSION="N/A" -FROM nvidia/cuda:12.6.3-base-ubuntu20.04 as build +FROM nvidia/cuda:12.6.3-base-ubuntu20.04 AS build RUN apt-get update && \ apt-get install -y wget make git gcc \ @@ -35,8 +35,8 @@ RUN set -eux; \ wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \ | tar -C /usr/local -xz -ENV GOPATH /go -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH +ENV GOPATH=/go +ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH WORKDIR /build COPY . . @@ -71,7 +71,7 @@ WORKDIR /artifacts/packages ARG PACKAGE_VERSION ARG TARGETARCH -ENV PACKAGE_ARCH ${TARGETARCH} +ENV PACKAGE_ARCH=${TARGETARCH} RUN dpkg -i \ ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1_1.*.deb \ @@ -84,6 +84,7 @@ COPY --from=build /artifacts/bin /work/ ENV PATH=/work:$PATH +ARG VERSION LABEL io.k8s.display-name="NVIDIA Container Runtime Config" LABEL name="NVIDIA Container Runtime Config" LABEL vendor="NVIDIA"