-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.SRO
41 lines (33 loc) · 1.04 KB
/
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
35
36
37
38
39
40
41
#
# Copyright(c) 2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
ARG IMAGE=registry.access.redhat.com/ubi8/ubi
FROM $IMAGE
WORKDIR /build/
# Expecting Open CAS version as an input to the build
ARG KMODVER
# Grab Open CAS code from upstream and remove modprobe from its Makefile
RUN git clone https://github.com/open-cas/open-cas-linux.git
WORKDIR /build/open-cas-linux
RUN git checkout -b ${KMODVER} origin/${KMODVER} \
&& git submodule update --init \
&& sed -i 's/utils//g' Makefile \
&& sed -i 's/^.*MODPROBE.*$//g' modules/Makefile
# Note, your host must have access to repos where kernel development
# packages can be installed. If it doesn't the following steps will
# fail
# Build and prepare the module
RUN ./configure
RUN make
RUN make install
# Add the helper tools
WORKDIR /root/kvc-open-cas-kmod
COPY Makefile .
COPY open-cas-kmod-lib.sh .
COPY open-cas-kmod-wrapper.sh .
COPY open-cas-kmod.conf .
RUN mkdir -p /usr/lib/kvc/
RUN mkdir -p /etc/kvc/
RUN make install
RUN systemctl enable kmods-via-containers@open-cas-kmod