03ab698efa
A buildkit FROM does its own pull and ignores the nodes' containerd mirror, so every build was an uncached, rate-limited Docker Hub pull. - point BASE_IMAGE at dockerhub/library/almalinux:9 - drop the syntax directive, which pulled a frontend image from Docker Hub for features this Dockerfile does not use
28 lines
880 B
Docker
28 lines
880 B
Docker
ARG BASE_IMAGE=artifactapi.k8s.syd1.au.unkin.net/dockerhub/library/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
|