]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
ci: add Gentoo Linux container
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Fri, 6 May 2022 13:25:16 +0000 (13:25 +0000)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Thu, 29 Sep 2022 05:21:06 +0000 (05:21 +0000)
The Gentoo container is configured to use openrc and musl to
test in those enviroments as well.

.github/workflows/container.yml
.github/workflows/manualtest.yml
test/container/Dockerfile-Gentoo [new file with mode: 0644]

index 7b96a027095e25b571b898aa478d31ac71791a66..04d0f33576edc740eabce4b267d1f331773771e6 100644 (file)
@@ -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
index ff56339c16ba60cab0550f9bbff1c3a13c7c4e63..5731cc363da91e0878271f614e7dc361bc2f8c86 100644 (file)
@@ -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 (file)
index 0000000..0da4c08
--- /dev/null
@@ -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"]