-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.rhel
26 lines (21 loc) · 1.04 KB
/
Dockerfile.rhel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM registry.access.redhat.com/ubi8:latest
WORKDIR /build/
# First update the base container to latest versions of everything
RUN yum update -y
# Expecting kmod software version as an input to the build
ARG KMODVER
# Grab the software from upstream. The URL is comprised of the
# version of the kmod as well as the version number of RHEL.
# For example: mlnx-en-4.7-1.0.0.1-rhel8.1-x86_64.tgz
RUN source /etc/os-release && \
curl -L https://www.mellanox.com/downloads/ofed/MLNX_EN-${KMODVER}/mlnx-en-${KMODVER}-rhel${VERSION_ID}-x86_64.tgz > ./file.tar.gz
RUN tar -x --strip-components=2 -f ./file.tar.gz
# Expecting kernel version as an input to the build
ARG KVER
# Note, your host must have access to repos where kernel developement
# packages can be installed. If it doesn't the following steps will
# fail
RUN yum install -y kernel-{core,devel,modules}-${KVER}
# Prep for and build the module(s)
RUN yum install -y perl createrepo kernel-devel python36 lsof elfutils-libelf-devel gcc rpm-build kernel-rpm-macros ethtool pciutils
RUN ./install --force