# syntax=docker/dockerfile:1 ARG BASE_IMAGE=docker.io/almalinux:9 FROM ${BASE_IMAGE} AS image ARG DISTRO=alma9 COPY distros/${DISTRO}/ /tmp/distro/ RUN set -eux; \ . /tmp/distro/distro.env; \ rm -f /etc/yum.repos.d/*.repo; \ curl -fsSL -o /tmp/ca.rpm "$CA_RPM_URL"; \ echo "$CA_RPM_SHA256 /tmp/ca.rpm" | sha256sum -c -; \ rpm -i /tmp/ca.rpm; \ cp /tmp/distro/yum.repos.d/*.repo /etc/yum.repos.d/; \ dnf makecache; \ dnf update -y; \ dnf install -y $PACKAGES; \ dnf clean all; \ rm -rf /var/cache/dnf /tmp/ca.rpm /tmp/distro CMD ["/bin/bash"] # Built only via `--target test`; assertions run as a build step so a broken image # fails the build, with no docker daemon needed in CI. FROM image AS test ARG DISTRO=alma9 COPY distros/${DISTRO}/distro.env test.sh /tmp/test/ RUN cd /tmp/test && ./test.sh FROM image AS final