public
Last active

Vagrant apt-cacher-ng

  • Download Gist
README.md
Markdown

Vagrant apt-cacher-ng Box

Simple and easy, just:

mkdir apt-cacher-ng && cd apt-cacher-ng
curl -LO https://raw.github.com/gist/1747868/Vagrantfile
vagrant up

Tail the logs perhaps?

vagrant ssh
sudo tail -f /var/log/apt-cacher-ng/apt-cacher.*

To use the caching box, determine your workstation's IP address and run the following on your Ubuntu/Debian node:

workstation_ip="xxx.xxx.xxx.xxx"
cat <<PROXY > /etc/apt/apt.conf.d/01proxy
Acquire::http::Proxy "http://${workstation_ip}:3142";
PROXY
Vagrantfile
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/env ruby
# coding: utf-8
 
Vagrant::Config.run do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.customize ["modifyvm", :id, "--memory", "128"]
config.vm.forward_port 3142, 3142
 
config.vm.provision :shell do |shell|
shell.inline = "apt-get update && apt-get install -y apt-cacher-ng"
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.