From 009c555006213572f4b6fcfa7e3dc2297df8b590 Mon Sep 17 00:00:00 2001 From: Florent Gluck <florent.gluck@hesge.ch> Date: Tue, 30 Jul 2024 23:13:42 +0200 Subject: [PATCH] nexus-live-exam-os: reduced iso image size by more than 200MB --- live_exam_os/Dockerfile | 2 +- live_exam_os/config/9999-removepkg.hook.chroot | 12 ++++++++++++ live_exam_os/config/packages.list.chroot | 3 --- live_exam_os/config/removepkg.hook.chroot | 7 ------- 4 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 live_exam_os/config/9999-removepkg.hook.chroot delete mode 100644 live_exam_os/config/removepkg.hook.chroot diff --git a/live_exam_os/Dockerfile b/live_exam_os/Dockerfile index 158476e2..dbdbaf0e 100644 --- a/live_exam_os/Dockerfile +++ b/live_exam_os/Dockerfile @@ -16,7 +16,7 @@ WORKDIR /live-default ADD ${config_dir}/packages.list.chroot config/package-lists/ ## Packages to be removed -ADD ${config_dir}/removepkg.hook.chroot config/hooks/live/ +ADD ${config_dir}/9999-removepkg.hook.chroot config/hooks/live/ ## Add swiss-french keyboard config ADD ${config_dir}/keyboard/keyboard config/includes.chroot/etc/default/ diff --git a/live_exam_os/config/9999-removepkg.hook.chroot b/live_exam_os/config/9999-removepkg.hook.chroot new file mode 100644 index 00000000..64645d05 --- /dev/null +++ b/live_exam_os/config/9999-removepkg.hook.chroot @@ -0,0 +1,12 @@ +#!/bin/sh + +apt-get remove -y light-locker nano bluetooth bluez bluez-firmware dosfstools raspi-firmware fdisk dnsmasq-base gdisk fuse3 eject avahi-daemon colord cron apparmor acl dns-root-data fxload gcr gnome-icon-theme gnome-keyring gnome-keyring-pkcs11 gnome-themes-extra gnome-themes-extra-data gnupg gnupg-utils gnupg-l10n gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm ifupdown indi-dsi iputils-ping ixo-usb-jtag less mobile-broadband-provider-info modemmanager ntfs-3g parted pinentry-curses pinentry-gnome3 pkexec policykit-1 poppler-data ppp publicsuffix rsync rtkit sane-airscan sane-utils pavucontrol sound-theme-freedesktop uuid-runtime vim-common vim-tiny whiptail xbitmaps xcvt xiccd iw + +apt-get clean -y +apt-get autopurge -y + +# Remove all packages marked as "rc", i.e. all packages deleted +# from the system but for which configuration files are still present +for i in `dpkg -l|grep ^rc|awk {'print $2'}`;do dpkg --force-all -P $i;done + +rm -rf /var/lib/apt/lists/* diff --git a/live_exam_os/config/packages.list.chroot b/live_exam_os/config/packages.list.chroot index 919b6f95..ac251405 100644 --- a/live_exam_os/config/packages.list.chroot +++ b/live_exam_os/config/packages.list.chroot @@ -1,11 +1,8 @@ task-laptop -task-french -task-french-desktop xfce4 xfce4-terminal xfce4-power-manager xfce4-battery-plugin -ca-certificates ufw virt-viewer firmware-iwlwifi diff --git a/live_exam_os/config/removepkg.hook.chroot b/live_exam_os/config/removepkg.hook.chroot deleted file mode 100644 index 769cb216..00000000 --- a/live_exam_os/config/removepkg.hook.chroot +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -apt-get remove -y light-locker libreoffice-common libreoffice-core firefox-esr firefox-esr-l10n-fr nano vim aspell aspell-fr bluetooth bluez bluez-firmware dosfstools raspi-firmware fdisk - -# Remove all packages marked as "rc", i.e. all packages deleted -# from the system but for which configuration files are still present -for i in `dpkg -l|grep ^rc|awk {'print $2'}`;do dpkg --force-all -P $i;done -- GitLab