Simple squid-deb-proxy image for caching deb packages.
- Install VirtualBox
- Install Vagrant
-
Clone this repository
git clone https://github.com/millerjp/vagrant-squid-deb-proxy.git cd vagrant-squid-deb-proxy
-
The default static IP is
10.211.99.100
. -
Start the VM
vagrant up
-
In the provisioning script for your other VMs, include these steps (adjusting IP address if you've changed it):
# install and configure for local debian proxy (if present) apt-get install squid-deb-proxy-client -y echo 'Acquire::http::Proxy "http://10.211.99.100:8000/";' | sudo tee /etc/apt/apt.conf.d/30autoproxy
-
Now start your other VMs as normal. They should start using this VM as a proxy/cache during any
apt-get
commands.
-
Connect up to the VM
vagrant ssh
-
Tail the squid logs
sudo tail -1000f /var/log/squid-deb-proxy/access.log
This has been copied and and modified for my set-up from Brian Cantoni's project: https://github.com/bcantoni/vagrant-deb-proxy . He has some great Vagrant images - check them out.
This is distributed under Apache License v2 and comes without any support. But feel free to use it :)