File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 1515# This is the dockerfile for building packages on yum-based RPM systems.
1616
1717ARG BASEIMAGE
18- FROM ${BASEIMAGE}
18+ FROM ${BASEIMAGE} AS build
1919
2020# centos:stream8 is EOL.
2121# We switch to the vault repositories for this base image.
@@ -73,6 +73,26 @@ WORKDIR $DIST_DIR/..
7373COPY packaging/rpm .
7474COPY deployments/systemd/ ${DIST_DIR}/
7575
76+ FROM quay.io/centos/centos:stream9
77+
78+ RUN yum install -y \
79+ ca-certificates \
80+ rpm-build && \
81+ rm -rf /var/cache/yum/*
82+
83+ ARG PKG_VERS
84+ ARG PKG_REV
85+ ARG GIT_COMMIT
86+ ENV PKG_VERS ${PKG_VERS}
87+ ENV PKG_REV ${PKG_REV}
88+ ENV GIT_COMMIT ${GIT_COMMIT}
89+
90+ ENV DIST_DIR=/tmp/nvidia-container-toolkit-$PKG_VERS/SOURCES
91+
92+ WORKDIR $DIST_DIR/..
93+ COPY --from=build /tmp/nvidia-container-toolkit-$PKG_VERS .
94+
95+
7696CMD arch=$(uname -m) && \
7797 rpmbuild --clean --target=$arch -bb \
7898 -D "_topdir $PWD" \
You can’t perform that action at this time.
0 commit comments