Skip to content

Commit d7d80af

Browse files
LaszloGombosjohannbg
authored andcommitted
ci: add Gentoo Linux container
The Gentoo container is configured to use openrc and musl to test in those enviroments as well.
1 parent 2a2c689 commit d7d80af

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.github/workflows/container.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' }
3333
- { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' }
3434
- { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' }
35+
- { dockerfile: 'Dockerfile-Gentoo', tag: 'gentoo:latest' }
3536
steps:
3637
- name: Check out the repo
3738
uses: actions/checkout@v2

.github/workflows/manualtest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
- "arch"
1717
- "debian"
1818
- "opensuse"
19+
- "gentoo"
1920

2021
jobs:
2122
test:

test/container/Dockerfile-Gentoo

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM docker.io/gentoo/portage:latest as portage
2+
3+
# kernel and its dependencies in a separate builder
4+
FROM docker.io/gentoo/stage3:musl as kernel
5+
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
6+
RUN emerge -qv virtual/dist-kernel
7+
8+
FROM docker.io/gentoo/stage3:musl
9+
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
10+
COPY --from=kernel /boot /boot
11+
COPY --from=kernel /lib/modules /lib/modules
12+
13+
MAINTAINER https://github.com/dracutdevs/dracut
14+
15+
ENV container docker
16+
LABEL RUN="docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e NAME=NAME -e IMAGE=IMAGE IMAGE"
17+
18+
RUN echo 'export DRACUT_NO_XATTR=1 KVERSION=$(cd /lib/modules; ls -1 | tail -1)' > /etc/profile.d/dracut-test.sh
19+
20+
# Install needed packages for the dracut CI container
21+
RUN emerge -qv \
22+
app-arch/cpio \
23+
app-emulation/qemu \
24+
app-shells/dash \
25+
sys-apps/busybox \
26+
sys-fs/btrfs-progs \
27+
sys-fs/squashfs-tools \
28+
&& rm -rf /var/cache/* /usr/share/doc/* /usr/share/man/* /var/db/repos/gentoo
29+
30+
# Set default command
31+
CMD ["/usr/bin/bash"]

0 commit comments

Comments
 (0)