From 7bcccf5fb37998def8f1cef9da3cf53b8b9f4fe3 Mon Sep 17 00:00:00 2001 From: Job79 Date: Mon, 29 Dec 2025 15:33:46 +0100 Subject: [PATCH] ci: add dnf cache --- containers/fedora/Containerfile | 3 ++- containers/go/Containerfile | 3 ++- containers/infra/Containerfile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index 2b78b15..d02bf92 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -1,7 +1,8 @@ FROM quay.io/fedora/fedora:43 # === install system packages === -RUN dnf update -y && \ +RUN --mount=type=cache,target=/var/cache/dnf \ + dnf update -y && \ dnf copr enable -y atim/lazygit && \ dnf -y install procps ping bash-completion glibc-langpack-en \ host-spawn dbus-launch \ diff --git a/containers/go/Containerfile b/containers/go/Containerfile index 2e7222f..9a88d06 100644 --- a/containers/go/Containerfile +++ b/containers/go/Containerfile @@ -2,6 +2,7 @@ ARG TAG FROM job79/fedora:${TAG} USER root -RUN dnf -y install go && dnf clean all +RUN --mount=type=cache,target=/var/cache/dnf \ + dnf -y install go && dnf clean all USER user diff --git a/containers/infra/Containerfile b/containers/infra/Containerfile index 0aad236..06579e4 100644 --- a/containers/infra/Containerfile +++ b/containers/infra/Containerfile @@ -2,7 +2,8 @@ ARG TAG FROM job79/fedora:${TAG} USER root -RUN dnf -y install kubectl k9s openssl age "$(curl -s https://api.github.com/repos/getsops/sops/releases/latest | jq -r '.assets[] | select(.name | test("sops-.*.x86_64.rpm$")) | .browser_download_url')" && \ +RUN --mount=type=cache,target=/var/cache/dnf \ + dnf -y install kubectl k9s openssl age "$(curl -s https://api.github.com/repos/getsops/sops/releases/latest | jq -r '.assets[] | select(.name | test("sops-.*.x86_64.rpm$")) | .browser_download_url')" && \ dnf clean all && \ curl -sL https://talos.dev/install | sh && \ curl -s https://fluxcd.io/install.sh | bash