forked from ublue-os/akmods
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Containerfile.zfs
38 lines (29 loc) · 1.09 KB
/
Containerfile.zfs
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
###
### Containerfile.zfs - used to build ONLY ZFS kmod
###
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-coreos-stable}"
ARG KERNEL_IMAGE="${KERNEL_IMAGE:-${KERNEL_FLAVOR}-kernel}"
ARG KERNEL_ORG="${KERNEL_ORG:-ublue-os}"
ARG KERNEL_BASE="ghcr.io/${KERNEL_ORG}/${KERNEL_IMAGE}:${FEDORA_MAJOR_VERSION}"
ARG BUILDER_IMAGE="${BUILDER_IMAGE:-quay.io/fedora/fedora}"
ARG BUILDER_BASE="${BUILDER_IMAGE}:${FEDORA_MAJOR_VERSION}"
FROM ${KERNEL_BASE} AS kernel_cache
FROM ${BUILDER_BASE} AS builder
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-40}"
ARG KERNEL_FLAVOR="${KERNEL_FLAVOR:-coreos-stable}"
ARG RPMFUSION_MIRROR=""
ARG ZFS_MINOR_VERSION="${ZFS_MINOR_VERSION:-2.2}"
COPY build*.sh /tmp
COPY certs /tmp/certs
# cached kernel rpms
COPY --from=kernel_cache /tmp/rpms /tmp/kernel_cache
# Set kernel name
RUN /tmp/build-prep.sh && \
/tmp/build-kmod-zfs.sh
RUN for RPM in $(find /var/cache/akmods/ -type f -name \*.rpm); do \
cp "${RPM}" /var/cache/rpms/kmods/; \
done
RUN find /var/cache/rpms
FROM scratch
COPY --from=builder /var/cache/rpms /rpms