diff options
Diffstat (limited to 'test/container/Dockerfile-Gentoo')
-rw-r--r-- | test/container/Dockerfile-Gentoo | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/test/container/Dockerfile-Gentoo b/test/container/Dockerfile-Gentoo index f2bb555..7b4eb2a 100644 --- a/test/container/Dockerfile-Gentoo +++ b/test/container/Dockerfile-Gentoo @@ -1,57 +1,59 @@ -ARG TAG=musl FROM docker.io/gentoo/portage:latest as portage -# uefi stub in a separate builder -FROM docker.io/gentoo/stage3 as efistub +FROM docker.io/gentoo/stage3:systemd COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo -# systemd-boot -RUN echo 'sys-apps/systemd-utils boot' > /etc/portage/package.use/systemd-utils && \ - emerge -qv sys-apps/systemd-utils +# Speed-up using binpkgs +RUN echo "MAKEOPTS=\"-j$(nproc) -l$(nproc)\"" >> /etc/portage/make.conf +RUN echo "EMERGE_DEFAULT_OPTS=\"-j$(nproc) -l$(nproc)\"" >> /etc/portage/make.conf +RUN echo "FEATURES=\"getbinpkg binpkg-ignore-signature parallel-fetch parallel-install pkgdir-index-trusted\"" >> /etc/portage/make.conf -# kernel and its dependencies in a separate builder -FROM docker.io/gentoo/stage3:$TAG as kernel -COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo -# disable initramfs generation, only need the kernel image itself -RUN echo 'sys-kernel/gentoo-kernel-bin -initramfs' > /etc/portage/package.use/kernel -RUN emerge -qv sys-kernel/gentoo-kernel-bin - -FROM docker.io/gentoo/stage3:$TAG -COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo -COPY --from=kernel /boot /boot -COPY --from=kernel /lib/modules /lib/modules -COPY --from=efistub /usr/lib/systemd/boot/efi /usr/lib/systemd/boot/efi -ARG TAG +# systemd-boot, no need to install intramfs with kernel +RUN echo "USE=\"boot kernel-install -initramfs\"" >> /etc/portage/make.conf -MAINTAINER https://github.com/dracutdevs/dracut +# Use debian's installkernel +RUN echo 'sys-kernel/installkernel -systemd' >> /etc/portage/package.use/kernel -# required by sys-fs/dmraid -RUN echo 'sys-fs/lvm2 lvm thin' > /etc/portage/package.use/lvm2 +# Enable ukify and cryptsetup tools (includes unit generator for crypttab) +RUN echo 'sys-apps/systemd ukify cryptsetup' >> /etc/portage/package.use/systemd -# workaround for https://bugs.gentoo.org/734022 whereby Gentoo does not support NFS4 with musl -RUN if [[ "$TAG" == 'musl' ]]; then echo 'net-fs/nfs-utils -nfsv4' > /etc/portage/package.use/nfs-utils ; fi +# Support thin volumes and build all of LVM2 including daemons and tools like lvchange +RUN echo 'sys-fs/lvm2 thin lvm' >> /etc/portage/package.use/lvm2 -# workaround for packages do not compile on musl -# https://bugs.gentoo.org/713490 for tgt -# https://bugs.gentoo.org/908587 for open-iscsi -RUN if [[ "$TAG" != 'musl' ]]; then emerge -qv sys-block/tgt sys-block/open-iscsi ; fi - -# Install needed packages for the dracut CI container -RUN emerge -qv \ +RUN emerge --quiet --deep --autounmask-continue=y --with-bdeps=n \ + app-admin/rsyslog \ app-arch/cpio \ + app-crypt/tpm2-tools \ + app-crypt/sbsigntools \ app-emulation/qemu \ + app-misc/jq \ + app-portage/gentoolkit \ app-shells/dash \ + dev-lang/rust-bin \ + net-fs/cifs-utils \ net-fs/nfs-utils \ net-misc/dhcp \ + net-wireless/bluez \ + sys-apps/biosdevname \ sys-apps/busybox \ + sys-apps/nvme-cli \ + sys-apps/rng-tools \ + sys-apps/systemd \ sys-block/nbd \ + sys-block/open-iscsi \ sys-block/parted \ + sys-block/tgt \ sys-fs/btrfs-progs \ sys-fs/cryptsetup \ sys-fs/dmraid \ - sys-fs/lvm2 \ sys-fs/mdadm \ sys-fs/multipath-tools \ sys-fs/ntfs3g \ sys-fs/squashfs-tools \ + sys-kernel/gentoo-kernel-bin \ + sys-libs/libxcrypt \ + sys-libs/glibc \ + virtual/pkgconfig \ && rm -rf /var/cache/* /usr/share/doc/* /usr/share/man/* + +RUN emerge --depclean --with-bdeps=n |