From: Laszlo Gombos Date: Fri, 6 May 2022 13:25:16 +0000 (+0000) Subject: ci: add Gentoo Linux container X-Git-Tag: 058~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7d80af9814f1983f0f678dcd4b7533bc9e05a4a;p=thirdparty%2Fdracut.git ci: add Gentoo Linux container The Gentoo container is configured to use openrc and musl to test in those enviroments as well. --- diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 7b96a0270..04d0f3357 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -32,6 +32,7 @@ jobs: - { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' } - { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' } - { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' } + - { dockerfile: 'Dockerfile-Gentoo', tag: 'gentoo:latest' } steps: - name: Check out the repo uses: actions/checkout@v2 diff --git a/.github/workflows/manualtest.yml b/.github/workflows/manualtest.yml index ff56339c1..5731cc363 100644 --- a/.github/workflows/manualtest.yml +++ b/.github/workflows/manualtest.yml @@ -16,6 +16,7 @@ on: - "arch" - "debian" - "opensuse" + - "gentoo" jobs: test: diff --git a/test/container/Dockerfile-Gentoo b/test/container/Dockerfile-Gentoo new file mode 100644 index 000000000..0da4c08ec --- /dev/null +++ b/test/container/Dockerfile-Gentoo @@ -0,0 +1,31 @@ +FROM docker.io/gentoo/portage:latest as portage + +# kernel and its dependencies in a separate builder +FROM docker.io/gentoo/stage3:musl as kernel +COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo +RUN emerge -qv virtual/dist-kernel + +FROM docker.io/gentoo/stage3:musl +COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo +COPY --from=kernel /boot /boot +COPY --from=kernel /lib/modules /lib/modules + +MAINTAINER https://github.com/dracutdevs/dracut + +ENV container docker +LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE" + +RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh + +# Install needed packages for the dracut CI container +RUN emerge -qv \ + app-arch/cpio \ + app-emulation/qemu \ + app-shells/dash \ + sys-apps/busybox \ + sys-fs/btrfs-progs \ + sys-fs/squashfs-tools \ + && rm -rf /var/cache/* /usr/share/doc/* /usr/share/man/* /var/db/repos/gentoo + +# Set default command +CMD ["/usr/bin/bash"]