]>
Commit | Line | Data |
---|---|---|
d7d80af9 LG |
1 | FROM docker.io/gentoo/portage:latest as portage |
2 | ||
ec2c7e1a LG |
3 | # uefi stub in a separate builder |
4 | FROM docker.io/gentoo/stage3 as efistub | |
5 | COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo | |
6 | ||
7 | # systemd-boot | |
8 | RUN mkdir -p /etc/portage/package.accept_keywords && \ | |
9 | echo "sys-boot/systemd-boot" >> /etc/portage/package.accept_keywords/systemd-boot && \ | |
10 | echo '>=sys-apps/systemd-utils-251.10 boot' > /etc/portage/package.use/systemd-boot && \ | |
11 | emerge -qv sys-boot/systemd-boot | |
12 | ||
d7d80af9 LG |
13 | # kernel and its dependencies in a separate builder |
14 | FROM docker.io/gentoo/stage3:musl as kernel | |
15 | COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo | |
a9ecb5e3 LG |
16 | # disable initramfs generation, only need the kernel image itself |
17 | RUN echo 'sys-kernel/gentoo-kernel-bin -initramfs' > /etc/portage/package.use/kernel | |
11eef2cf | 18 | RUN emerge -qv sys-kernel/gentoo-kernel-bin |
d7d80af9 LG |
19 | |
20 | FROM docker.io/gentoo/stage3:musl | |
21 | COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo | |
22 | COPY --from=kernel /boot /boot | |
23 | COPY --from=kernel /lib/modules /lib/modules | |
ec2c7e1a | 24 | COPY --from=efistub /usr/lib/systemd/boot/efi /usr/lib/systemd/boot/efi |
d7d80af9 LG |
25 | |
26 | MAINTAINER https://github.com/dracutdevs/dracut | |
27 | ||
a3c67d27 MC |
28 | # Only install `dmsetup`: attempting to install all of lvm2 fails due to missing kernel headers. |
29 | RUN echo 'sys-fs/lvm2 device-mapper-only -thin' > /etc/portage/package.use/lvm2 | |
30 | ||
376c2360 | 31 | # workaround for https://bugs.gentoo.org/734022 whereby Gentoo does not support NFS4 with musl |
fa18c413 LG |
32 | RUN echo 'net-fs/nfs-utils -nfsv4' > /etc/portage/package.use/nfs-utils |
33 | ||
3c16c76f LG |
34 | RUN echo '>=sys-fs/lvm2-2.03.17-r1 lvm' > /etc/portage/package.use/dmraid |
35 | ||
d7d80af9 LG |
36 | # Install needed packages for the dracut CI container |
37 | RUN emerge -qv \ | |
38 | app-arch/cpio \ | |
39 | app-emulation/qemu \ | |
40 | app-shells/dash \ | |
fa18c413 LG |
41 | net-fs/nfs-utils \ |
42 | net-misc/dhcp \ | |
d7d80af9 | 43 | sys-apps/busybox \ |
fa18c413 | 44 | sys-block/nbd \ |
5803ece5 | 45 | sys-block/open-iscsi \ |
a3c67d27 | 46 | sys-block/parted \ |
22d56ca0 | 47 | sys-block/thin-provisioning-tools \ |
d7d80af9 | 48 | sys-fs/btrfs-progs \ |
5803ece5 | 49 | sys-fs/cryptsetup \ |
4797c5b9 | 50 | sys-fs/dmraid \ |
a3c67d27 | 51 | sys-fs/lvm2 \ |
55ddaef4 | 52 | sys-fs/mdadm \ |
5803ece5 | 53 | sys-fs/multipath-tools \ |
62f7e062 | 54 | sys-fs/ntfs3g \ |
d7d80af9 | 55 | sys-fs/squashfs-tools \ |
718e49e0 | 56 | && rm -rf /var/cache/* /usr/share/doc/* /usr/share/man/* |