disable APT package cache to save some space

This commit is contained in:
James Swineson 2019-06-21 09:59:49 +08:00 committed by GitHub
parent 30d6c09c1b
commit 775c6bd14b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,6 +106,10 @@ mount_new_rootfs() {
install_software() {
echo "Installing OpenSSH Server into new rootfs..."
# disable APT cache
echo -e 'Dir::Cache "";\nDir::Cache::archives "";' > "${NEWROOT}/etc/apt/apt.conf.d/00_disable-cache-directories"
DEBIAN_FRONTEND=noninteractive chroot "${NEWROOT}" apt-get update -y
DEBIAN_FRONTEND=noninteractive chroot "${NEWROOT}" apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y ssh
}