From 534798dbd2c55c16f1c662bd60b30dba013a8943 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Sun, 15 Nov 2020 11:27:51 +0100 Subject: [PATCH] add example for how to use a cache directory --- mmdebstrap | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mmdebstrap b/mmdebstrap index 446d173..87a4098 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -6448,6 +6448,17 @@ Build a non-Debian chroot like Ubuntu bionic: $ mmdebstrap --aptopt='Dir::Etc::Trusted "/usr/share/keyrings/ubuntu-keyring-2012-archive.gpg"' bionic bionic.tar +If, for some reason, you cannot use a caching proxy like apt-cacher or +apt-cacher-ng, you can use the B and B special hooks to +synchronize a directory outside the chroot with F +inside the chroot. + + $ mmdebstrap --variant=apt --skip=download/empty --skip=essential/unlink \ + --setup-hook='mkdir -p ./cache "$1"/var/cache/apt/archives/' \ + --setup-hook='sync-in ./cache /var/cache/apt/archives/' \ + --customize-hook='sync-out /var/cache/apt/archives ./cache' \ + unstable /dev/null + =head1 ENVIRONMENT VARIABLES =over 8