From 9897238f3a0716a4a30c44b1a554be584ff12ec2 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Thu, 10 Dec 2020 09:20:56 -0600 Subject: [PATCH] rootfs: reduce size of debian image Improve Kata Containers memory footprint by reducing debian image size. Without this change: Debian image -> 256MB With this change: Debian image -> 128MB Note: this change *will not* impact ubuntu image. fixes #1188 Signed-off-by: Julio Montes --- tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh b/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh index a012a5cc4c..e773c62a8f 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh +++ b/tools/osbuilder/rootfs-builder/ubuntu/rootfs_lib.sh @@ -80,5 +80,8 @@ build_rootfs() { ${ROOTFS_DIR} chroot $ROOTFS_DIR ln -s /lib/systemd/systemd /usr/lib/systemd/systemd -} + # Reduce image size and memory footprint + # removing not needed files and directories. + chroot $ROOTFS_DIR rm -rf /usr/share/{bash-completion,bug,doc,info,lintian,locale,man,menu,misc,pixmaps,terminfo,zoneinfo,zsh} +}