ci(fedora41-hip): update the image in sync w/ fedora41

- Use the correct path for the DNF cache.
- There is not much sense in having a DNF cache image separately when
  the only `RUN` command is to install required packages.
This commit is contained in:
Alex Turbov 2025-01-29 21:00:20 +04:00 committed by Brad King
parent fa08bd803d
commit 72cce810ce
3 changed files with 35 additions and 28 deletions

View File

@ -3,25 +3,10 @@
ARG BASE_IMAGE=fedora:41
FROM ${BASE_IMAGE} AS dnf-cache
# Populate DNF cache w/ the fresh metadata and prefetch packages.
RUN --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
--mount=type=tmpfs,target=/var/log \
--mount=type=tmpfs,target=/tmp \
dnf install \
--setopt=install_weak_deps=False \
--setopt=fastestmirror=True \
--setopt=max_parallel_downloads=10 \
--downloadonly \
-y \
$(grep -h '^[^#]\+$' /root/*.lst)
FROM ${BASE_IMAGE}
LABEL maintainer="Brad King <brad.king@kitware.com>"
RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \
RUN --mount=type=bind,source=dnf.conf,target=/etc/dnf/dnf.conf \
--mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \
--mount=type=cache,from=dnf-cache,source=/var/lib/dnf,target=/var/lib/dnf,sharing=private \
--mount=type=cache,target=/var/cache/pip \
--mount=type=cache,target=/var/lib/dnf \
--mount=type=tmpfs,target=/var/log \
--mount=type=tmpfs,target=/tmp \
sh /root/install_deps.sh
dnf install -y $(grep -h '^[^#]\+$' /root/*.lst)

View File

@ -0,0 +1,32 @@
[main]
autocheck_running_kernel=0
debuglevel=2
diskspacecheck=0
fastestmirror=1
gpgcheck=1
installonly_limit=5
install_weak_deps=0
keepcache=1
log_rotate=0
max_parallel_downloads=10
metadata_expire=90m
multilib_policy=best
plugins=1
tsflags=nodocs
# Enable color for all output
color=always
# Default color options according to yum.conf(5)
color_list_installed_older=bold,black
color_list_installed_newer=bold,yellow
color_list_installed_reinstall=normal
color_list_installed_extra=bold,red
color_list_available_upgrade=bold,blue
color_list_available_downgrade=dim,yellow
color_list_available_install=normal
color_list_available_reinstall =bold,underline,green
color_search_match=bold,magenta
color_update_installed=green
color_update_local=cyan
color_update_remote=yellow

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -e
dnf install \
--setopt=install_weak_deps=False \
--setopt=fastestmirror=True \
--setopt=max_parallel_downloads=10 \
-y \
$(grep '^[^#]\+$' /root/deps_packages.lst)