readme for apt-cacher
This commit is contained in:
parent
b0110897a7
commit
fdd6daa5fc
1 changed files with 31 additions and 0 deletions
31
README.md
31
README.md
|
@ -199,6 +199,37 @@ folder under the result of running `rvm info` as the default SSH user (usualy
|
||||||
it is already installed before enabling the bucket, otherwise you won't benefit
|
it is already installed before enabling the bucket, otherwise you won't benefit
|
||||||
from this plugin.
|
from this plugin.
|
||||||
|
|
||||||
|
|
||||||
|
##### APT-CACHER
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
Vagrant.configure("2") do |config|
|
||||||
|
config.vm.box = 'some-debian-box'
|
||||||
|
config.cache.enable :apt_cacher
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
This is useful, if you are using containers inside your VMs, e.g VirtualBox -> LXC. This would allow you to reuse packages without sharing folder inside VirtualBox. Only works with NFS-shared folders (since `vboxsf` is enforcing `vagrant`-user and `apt-cacher` is running under `apt-cacher-ng` user)
|
||||||
|
|
||||||
|
# install apt-cacher on (Host)-VM
|
||||||
|
$ sudo apt-get install apt-cacher-ng
|
||||||
|
|
||||||
|
# get the IP for eth0 interface
|
||||||
|
$ ifconfig eth0 |grep "inet addr"|awk '{print $2}' |cut -c6-20
|
||||||
|
|
||||||
|
# configure mirror on for your docker/LXC instances:
|
||||||
|
$ echo 'Acquire::http { Proxy "http://X.X.X.X:3142"; };' > /etc/apt/apt.conf.d/10mirror
|
||||||
|
|
||||||
|
# check, if working by tailing log on (Host)-VM, while installing packages on (Guest)-VMs
|
||||||
|
$ tail -f /var/log/apt-cacher-ng/apt-cacher.log
|
||||||
|
|
||||||
|
|
||||||
|
Used by Debian-like Linux distros, will get configured under guest's `/var/cache/apt-cacher-ng`.
|
||||||
|
|
||||||
|
_Please note that to avoid re-downloading packages, you should avoid `apt-get clean`
|
||||||
|
as much as possible in order to make a better use of the cache, even if you are
|
||||||
|
packaging a box_
|
||||||
|
|
||||||
## Finding out disk space used by buckets
|
## Finding out disk space used by buckets
|
||||||
|
|
||||||
_TODO_
|
_TODO_
|
||||||
|
|
Loading…
Reference in a new issue