Skip to content

Commit e29591b

Browse files
committed
chore(docker): add AlmaLinux 9 container
Mostly for Bash 5.1 test coverage, and likely eventual CentOS 7 replacement.
1 parent 33f789c commit e29591b

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
strategy:
5252
matrix:
5353
include:
54+
- dist: almalinux9
5455
- dist: alpine
5556
- dist: centos7
5657
- dist: debian10

.github/workflows/update-docker-images.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
include:
28+
- dist: almalinux9
2829
- dist: alpine
2930
- dist: centos7
3031
- dist: debian10

test/docker/almalinux9/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM almalinux:9
2+
3+
RUN set -x \
4+
echo install_weak_deps=False >> /etc/dnf/dnf.conf \
5+
&& dnf -y --refresh upgrade \
6+
&& dnf -y install epel-release \
7+
&& dnf -y --refresh install \
8+
/usr/bin/autoconf \
9+
/usr/bin/automake \
10+
/usr/bin/make \
11+
/usr/bin/xvfb-run \
12+
/usr/bin/pytest-3 \
13+
openssh-server \
14+
python3-pexpect \
15+
python3-pytest-xdist \
16+
&& ln -s $(type -P pytest-3) /usr/local/bin/pytest
17+
18+
ADD test-cmd-list.txt \
19+
docker/almalinux9/install-packages.sh \
20+
/tmp/
21+
22+
RUN /tmp/install-packages.sh </tmp/test-cmd-list.txt \
23+
&& dnf -Cy clean all \
24+
&& rm -r /tmp/* /var/lib/dnf/history.sqlite* /var/lib/dnf/repos/*
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -xeuo pipefail
3+
4+
shopt -s extglob
5+
6+
cd "${TMPDIR:-/tmp}"
7+
8+
while read -r file; do
9+
case $file in
10+
/*) printf "%s\n" "$file" ;;
11+
*) printf "%s\n" {/usr,}/{,s}bin/"$file" ;;
12+
esac
13+
done |
14+
xargs dnf -y install --skip-broken
15+
# --skip-broken: avoid failing on not found packages. Also prevents actually
16+
# broken packages from failing the install which is not what we want, but
17+
# there doesn't seem to be way to cleanly just skip the not found ones.

0 commit comments

Comments
 (0)