From bc79a1fffb44c37efe6534e6c1c3b9265bbe8f62 Mon Sep 17 00:00:00 2001 From: sickcodes Date: Mon, 29 Nov 2021 04:15:44 +0000 Subject: [PATCH] Shrink the Docker containers, significantly. --- Dockerfile | 11 +++++++---- Dockerfile.naked | 10 +++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index f57989a..9aa8bc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -145,7 +145,7 @@ WORKDIR /home/arch/OSX-KVM # RUN wget https://raw.githubusercontent.com/kholia/OSX-KVM/master/fetch-macOS-v2.py -ARG SHORTNAME +ARG SHORTNAME=catalina RUN make @@ -226,7 +226,8 @@ RUN sudo pacman -Syy \ && sudo pacman -U "${KERNEL_PACKAGE_URL}" --noconfirm \ && sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \ && rm -rf /var/tmp/.guestfs-* \ - ; libguestfs-test-tool || exit 1 + ; libguestfs-test-tool || exit 1 \ + ; rm -rf /var/tmp/.guestfs-* #### @@ -260,7 +261,8 @@ RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \ --mac-address "${STOCK_MAC_ADDRESS}" \ --width "${STOCK_WIDTH}" \ --height "${STOCK_HEIGHT}" \ - --output-bootdisk "${STOCK_BOOTDISK}" || exit 1 + --output-bootdisk "${STOCK_BOOTDISK}" || exit 1 \ + ; rm -rf /var/tmp/.guestfs-* RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \ --master-plist-url="${STOCK_MASTER_PLIST_URL_NOPICKER}" \ @@ -271,7 +273,8 @@ RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \ --mac-address "${STOCK_MAC_ADDRESS}" \ --width "${STOCK_WIDTH}" \ --height "${STOCK_HEIGHT}" \ - --output-bootdisk "${STOCK_BOOTDISK_NOPICKER}" || exit 1 + --output-bootdisk "${STOCK_BOOTDISK_NOPICKER}" || exit 1 \ + ; rm -rf /var/tmp/.guestfs-* ### symlink the old directory as upstream has renamed a directory. Symlinking purely for backwards compatability! RUN ln -s /home/arch/OSX-KVM/OpenCore /home/arch/OSX-KVM/OpenCore-Catalina || true diff --git a/Dockerfile.naked b/Dockerfile.naked index df757ad..f7425f9 100644 --- a/Dockerfile.naked +++ b/Dockerfile.naked @@ -217,7 +217,8 @@ RUN sudo pacman -Syy \ && sudo pacman -U "${LIBGUESTFS_PACKAGE_URL}" --noconfirm \ && rm -rf /var/tmp/.guestfs-* \ && yes | sudo pacman -Scc \ - ; libguestfs-test-tool || exit 1 + ; libguestfs-test-tool || exit 1 \ + && rm -rf /var/tmp/.guestfs-* #### @@ -251,7 +252,8 @@ ARG STOCK_BOOTDISK_NOPICKER=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2 # --mac-address "${STOCK_MAC_ADDRESS}" \ # --width "${STOCK_WIDTH}" \ # --height "${STOCK_HEIGHT}" \ -# --output-bootdisk "${STOCK_BOOTDISK}" || exit 1 +# --output-bootdisk "${STOCK_BOOTDISK}" || exit 1 \ +# ; rm -rf /var/tmp/.guestfs-* # RUN ./Docker-OSX/osx-serial-generator/generate-specific-bootdisk.sh \ # --master-plist-url="${STOCK_MASTER_PLIST_URL_NOPICKER}" \ @@ -262,7 +264,9 @@ ARG STOCK_BOOTDISK_NOPICKER=/home/arch/OSX-KVM/OpenCore/OpenCore-nopicker.qcow2 # --mac-address "${STOCK_MAC_ADDRESS}" \ # --width "${STOCK_WIDTH}" \ # --height "${STOCK_HEIGHT}" \ -# --output-bootdisk "${STOCK_BOOTDISK_NOPICKER}" || exit 1 +# --output-bootdisk "${STOCK_BOOTDISK_NOPICKER}" || exit 1 \ +# ; rm -rf /var/tmp/.guestfs-* + WORKDIR /home/arch/OSX-KVM