-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.fedora
28 lines (24 loc) · 1.1 KB
/
Dockerfile.fedora
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
27
28
FROM registry.fedoraproject.org/fedora:30
MAINTAINER "coreos@lists.fedoraproject.org"
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
ADD https://github.com/cloudfirst-dev/qlnic-kmod/archive/${KMODVER}.tar.gz ./file.tar.gz
RUN tar -x --strip-components=1 -f ./file.tar.gz
# Expecting kernel version as an input to the build
ARG KVER
# Grab kernel rpms from koji and install them
RUN yum install -y koji
RUN koji download-build --rpm --arch=$(uname -m) kernel-core-${KVER} && \
koji download-build --rpm --arch=$(uname -m) kernel-devel-${KVER} && \
koji download-build --rpm --arch=$(uname -m) kernel-modules-${KVER} && \
yum install -y ./kernel-{core,devel,modules}-${KVER}.rpm && \
rm -f ./kernel-{core,devel,modules}-${KVER}.rpm
# Prep and build the module
RUN yum install -y make
RUN make buildprep KVER=${KVER} KMODVER=${KMODVER}
RUN make all KVER=${KVER} KMODVER=${KMODVER}
RUN make install KVER=${KVER} KMODVER=${KMODVER}