forked from kmods-via-containers/kvc-simple-kmod
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile.SRO
34 lines (26 loc) · 864 Bytes
/
Dockerfile.SRO
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
29
30
31
32
33
34
ARG IMAGE=registry.access.redhat.com/ubi8/ubi
FROM $IMAGE
WORKDIR /build/
# Expecting kmod software version as an input to the build
ARG KMODVER
# Grab the software from upstream
RUN git clone https://github.com/openshift-psap/simple-kmod.git
WORKDIR simple-kmod
# 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
# Build the module
RUN make all KVER=${KVER} KMODVER=${KMODVER}
RUN make install KVER=${KVER} KMODVER=${KMODVER}
# Add the helper tools
WORKDIR /root/kvc-simple-kmod
ADD Makefile .
ADD simple-kmod-lib.sh .
ADD simple-kmod-wrapper.sh .
ADD simple-kmod.conf .
RUN mkdir -p /usr/lib/kvc/
RUN mkdir -p /etc/kvc/
RUN make install
RUN systemctl enable kmods-via-containers@simple-kmod