A Vagrant machine running apt-cacher-ng for other Debian/Ubuntu VMs to proxy through, speeding up subsequent APT installs after destroying & reprovisioning, etc.
-
Optional: Change the IP and port in the
Vagrantfile
if conflicting -
Run
vagrant up
-
Update VMs to use the VM as an APT proxy (replacing the IP addresses if changed in step 0):
echo 'Acquire::http { Proxy "http://10.10.10.254:3142"; }' \ > /etc/apt/apt.conf.d/00proxy && \ echo 'Acquire::https { Proxy "http://10.10.10.254:3142"; }' \ >> /etc/apt/apt.conf.d/00proxy
Optional: Install the
vagrant-hostsupdater
plugin to allow usingapt-cache.test
instead of the IP address above.
APT cache files will be stored in the same directory under an apt-cache
subdirectory, preserving the cache after destroying and rebuilding this VM, and keeping the VM itself's disk size small.