Skip to content

Commit d75b1ad

Browse files
authored
Merge pull request #868 from elezar/docker-file-fixes
[no-relnote] Fix Dockerfile lint issues
2 parents 9aa2f67 + 7c5ed81 commit d75b1ad

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

deployments/container/Dockerfile.ubi8

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
ARG GOLANG_VERSION=x.x.x
1616
ARG VERSION="N/A"
1717

18-
FROM nvidia/cuda:12.6.3-base-ubi8 as build
18+
FROM nvidia/cuda:12.6.3-base-ubi8 AS build
1919

2020
RUN yum install -y \
2121
wget make git gcc \
@@ -36,8 +36,8 @@ RUN set -eux; \
3636
| tar -C /usr/local -xz
3737

3838

39-
ENV GOPATH /go
40-
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
39+
ENV GOPATH=/go
40+
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
4141

4242
WORKDIR /build
4343
COPY . .
@@ -62,7 +62,8 @@ WORKDIR /artifacts/packages
6262

6363
ARG PACKAGE_VERSION
6464
ARG TARGETARCH
65-
ENV PACKAGE_ARCH ${TARGETARCH}
65+
ENV PACKAGE_ARCH=${TARGETARCH}
66+
6667
RUN PACKAGE_ARCH=${PACKAGE_ARCH/amd64/x86_64} && PACKAGE_ARCH=${PACKAGE_ARCH/arm64/aarch64} && \
6768
yum localinstall -y \
6869
${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1-1.*.rpm \
@@ -75,6 +76,7 @@ COPY --from=build /artifacts/bin /work
7576

7677
ENV PATH=/work:$PATH
7778

79+
ARG VERSION
7880
LABEL io.k8s.display-name="NVIDIA Container Runtime Config"
7981
LABEL name="NVIDIA Container Runtime Config"
8082
LABEL vendor="NVIDIA"

deployments/container/Dockerfile.ubuntu

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
ARG GOLANG_VERSION=x.x.x
1616
ARG VERSION="N/A"
1717

18-
FROM nvidia/cuda:12.6.3-base-ubuntu20.04 as build
18+
FROM nvidia/cuda:12.6.3-base-ubuntu20.04 AS build
1919

2020
RUN apt-get update && \
2121
apt-get install -y wget make git gcc \
@@ -35,8 +35,8 @@ RUN set -eux; \
3535
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
3636
| tar -C /usr/local -xz
3737

38-
ENV GOPATH /go
39-
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
38+
ENV GOPATH=/go
39+
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
4040

4141
WORKDIR /build
4242
COPY . .
@@ -71,7 +71,7 @@ WORKDIR /artifacts/packages
7171

7272
ARG PACKAGE_VERSION
7373
ARG TARGETARCH
74-
ENV PACKAGE_ARCH ${TARGETARCH}
74+
ENV PACKAGE_ARCH=${TARGETARCH}
7575

7676
RUN dpkg -i \
7777
${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1_1.*.deb \
@@ -84,6 +84,7 @@ COPY --from=build /artifacts/bin /work/
8484

8585
ENV PATH=/work:$PATH
8686

87+
ARG VERSION
8788
LABEL io.k8s.display-name="NVIDIA Container Runtime Config"
8889
LABEL name="NVIDIA Container Runtime Config"
8990
LABEL vendor="NVIDIA"

0 commit comments

Comments
 (0)