2022-02-14 13:08:24 +00:00
|
|
|
ARG BASEIMAGE=centos:8
|
|
|
|
FROM ${BASEIMAGE}
|
|
|
|
|
|
|
|
ARG BASEIMAGE
|
|
|
|
# See https://www.centos.org/centos-linux-eol/
|
2022-02-18 10:50:37 +00:00
|
|
|
# and https://stackoverflow.com/a/70930049 for move to vault.centos.org
|
|
|
|
# and https://serverfault.com/questions/1093922/failing-to-run-yum-update-in-centos-8 for move to vault.epel.cloud
|
2022-02-14 13:08:24 +00:00
|
|
|
RUN [[ "${BASEIMAGE}" != "centos:8" ]] || \
|
|
|
|
( \
|
|
|
|
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
|
2022-02-18 10:50:37 +00:00
|
|
|
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.epel.cloud|g' /etc/yum.repos.d/CentOS-Linux-* \
|
2022-02-14 13:08:24 +00:00
|
|
|
)
|
2021-09-24 12:23:00 +00:00
|
|
|
|
|
|
|
RUN yum install -y \
|
|
|
|
yum-utils \
|
|
|
|
ruby-devel \
|
|
|
|
gcc \
|
|
|
|
make \
|
|
|
|
rpm-build \
|
|
|
|
rubygems \
|
|
|
|
createrepo
|
|
|
|
|
|
|
|
RUN gem install --no-document fpm
|
|
|
|
|
|
|
|
# We create and install a dummy docker package since these dependencies are out of
|
|
|
|
# scope for the tests performed here.
|
|
|
|
RUN fpm -s empty \
|
|
|
|
-t rpm \
|
|
|
|
--description "A dummy package for docker-ce_18.06.3.ce-3.el7" \
|
|
|
|
-n docker-ce --version 18.06.3.ce-3.el7 \
|
|
|
|
-p /tmp/docker.rpm \
|
|
|
|
&& \
|
|
|
|
yum localinstall -y /tmp/docker.rpm \
|
|
|
|
&& \
|
|
|
|
rm -f /tmp/docker.rpm
|
|
|
|
|
|
|
|
|
|
|
|
ARG WORKFLOW=nvidia-docker
|
|
|
|
RUN curl -s -L https://nvidia.github.io/${WORKFLOW}/centos8/nvidia-docker.repo \
|
|
|
|
| tee /etc/yum.repos.d/nvidia-docker.repo
|
|
|
|
|
|
|
|
COPY entrypoint.sh /
|
2021-11-16 14:00:58 +00:00
|
|
|
COPY install_repo.sh /
|
2021-09-24 12:23:00 +00:00
|
|
|
|
|
|
|
ENTRYPOINT [ "/entrypoint.sh" ]
|