fix: cache dnf installs (and remove cache from images)

This commit is contained in:
Job
2025-12-29 17:10:28 +01:00
parent 4bf4addd5a
commit ea482aa61f
4 changed files with 14 additions and 9 deletions

View File

@@ -3,7 +3,9 @@ ARG studio_version="2025.1.4.8"
ARG download_uri="https://redirector.gvt1.com/edgedl/android/studio/ide-zips/${studio_version}/android-studio-${studio_version}-linux.tar.gz"
USER root
RUN dnf -y install libXext libXrender libXtst libX11 freetype freetype-devel mesa-libGLU
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel mesa-libGLU
USER user
RUN curl -Lo /tmp/studio.tar.gz "${download_uri}" && \

View File

@@ -1,7 +1,8 @@
FROM git.plabble.org/maurice/fedora:main
USER root
RUN dnf -y install dotnet-sdk-9.0 dotnet-sdk-10.0
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf -y --setopt=keepcache=1 install dotnet-sdk-9.0 dotnet-sdk-10.0
COPY install-roslyn.sh /tmp/install-roslyn.sh
RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh

View File

@@ -1,8 +1,9 @@
FROM quay.io/fedora/fedora:43
# === install system packages ===
RUN dnf update -y && \
dnf -y install procps ping bash-completion glibc-langpack-en \
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf update -y && \
dnf -y --setopt=keepcache=1 install procps ping bash-completion glibc-langpack-en \
host-spawn dbus-launch \
git pnpm helix zip

View File

@@ -3,7 +3,8 @@ ARG rider_version="2025.3.0.3"
ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz"
USER root
RUN dnf -y install libXext libXrender libXtst libX11 freetype freetype-devel
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel
USER user
RUN curl -Lo /tmp/rider.tar.gz "${download_uri}" && \