debootstrap like this:
sudo debootstrap --verbose --arch=amd64 zesty chroot
I have already installed
How do I make them work together so that when I run debootstrap multiple times I use the cache instead of repeatedly downloading the same packages?
I have tried using the MIRROR option and setting the http_proxy variable but it errors when I run offline:
$ sudo http_proxy="http://localhost:3142" debootstrap --verbose --arch=amd64 zesty chroot http://localhost:3142/uburep I: Retrieving InRelease I: Failed to retrieve InRelease I: Retrieving Release E: Failed getting release file http://localhost:3142/uburep/dists/zesty/Release
http://localhost:3142/uburep because that is what I found in the cache:
$ find /var/cache/apt-cacher-ng -name Release /var/cache/apt-cacher-ng/security.ubuntu.com/ubuntu/dists/zesty-security/Release /var/cache/apt-cacher-ng/uburep/dists/zesty-updates/Release /var/cache/apt-cacher-ng/uburep/dists/zesty-backports/Release /var/cache/apt-cacher-ng/uburep/dists/zesty/Release
I tried adding
Defaults env_keep += "http_proxy https_proxy ftp_proxy" to /etc/sudoers (via sudo visudo) but it didn't help either.
If I remove the MIRROR option and run debootstrap offline it then doesn't seem to use apt-cacher-ng at all (note how it is not looking for localhost any more).
E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/zesty/Release