forked from kmods-via-containers/kvc-simple-kmod
-
Notifications
You must be signed in to change notification settings - Fork 10
/
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 "[email protected]"
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/kmods-via-containers/simple-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}