diff --git a/Containerfile b/Containerfile index 9866c6f..7d46e5c 100644 --- a/Containerfile +++ b/Containerfile @@ -40,7 +40,7 @@ RUN --mount=type=bind,from=build-ctx,source=/build/10-repos.sh,target=/tmp/10-re --mount=type=cache,dst=/var/cache \ --mount=type=cache,dst=/var/log \ --mount=type=tmpfs,dst=/tmp \ - bash /tmp/10-repos.sh && dnf5 clean all + bash /tmp/10-repos.sh # LAYER 2: Unerwünschte Pakete entfernen (Bereinigungsschicht - vorgezogen) RUN --mount=type=bind,from=build-ctx,source=/build/20-remove-packages.sh,target=/tmp/20-remove-packages.sh \ diff --git a/build/10-repos.sh b/build/10-repos.sh index 5ce2f7b..f09079f 100755 --- a/build/10-repos.sh +++ b/build/10-repos.sh @@ -21,6 +21,4 @@ cp -n /usr/share/dnf5/repos.d/*.repo /etc/yum.repos.d/ 2>/dev/null || true # GPG-Keys ebenfalls an den bisherigen Ort spiegeln (DNF4/rpm-ostree). mkdir -p /etc/pki/rpm-gpg -cp -n /usr/share/pki/rpm-gpg/* /etc/pki/rpm-gpg/ 2>/dev/null || true - -dnf5 clean all \ No newline at end of file +cp -n /usr/share/pki/rpm-gpg/* /etc/pki/rpm-gpg/ 2>/dev/null || true \ No newline at end of file diff --git a/build/20-remove-packages.sh b/build/20-remove-packages.sh index aff358f..165e700 100755 --- a/build/20-remove-packages.sh +++ b/build/20-remove-packages.sh @@ -9,5 +9,3 @@ echo "Removing Firefox and langpacks..." dnf5 remove -y \ firefox \ firefox-langpacks* || true - - dnf5 clean all diff --git a/build/30-virt.sh b/build/30-virt.sh index 526ccbc..d089337 100755 --- a/build/30-virt.sh +++ b/build/30-virt.sh @@ -28,8 +28,3 @@ for pkg in distrobox toolbox libva-utils micro fuse fuse-libs fuse3 jq libnotify echo "WARN: ${pkg} nicht installiert (Repo-/Umbenennungsproblem?)" >&2 fi done - -dnf5 clean all - - - diff --git a/build/40-multimedia.sh b/build/40-multimedia.sh index 7c9331d..7d8b906 100755 --- a/build/40-multimedia.sh +++ b/build/40-multimedia.sh @@ -34,8 +34,6 @@ for pkg in mesa-va-drivers-freeworld mesa-vulkan-drivers-freeworld ffmpeg \ fi done -dnf5 clean all - #echo "Installing rocm" #dnf5 install -y \ # rocm-clinfo \ diff --git a/build/README.md b/build/README.md index 32363c3..d6f8766 100644 --- a/build/README.md +++ b/build/README.md @@ -49,12 +49,16 @@ Ohne Loeschen deaktivieren: ## Ausfuehrung im Containerfile ```dockerfile -RUN --mount=type=bind,from=ctx,source=/build/10-repos.sh,target=/tmp/10-repos.sh \ +RUN --mount=type=bind,from=build-ctx,source=/build/10-repos.sh,target=/tmp/10-repos.sh \ --mount=type=cache,dst=/var/cache \ + --mount=type=cache,dst=/var/log \ --mount=type=tmpfs,dst=/tmp \ - bash /tmp/10-repos.sh && dnf5 clean all + bash /tmp/10-repos.sh ``` +Kein `dnf5 clean all` in den Zwischenlayern: das wuerde den geteilten Cache-Mount +sofort wieder leeren. Die Bereinigung erfolgt einmalig in `99-cleanup.sh`. + ## Hinweise - Scripts laufen als root waehrend des Builds