Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.

apt-get cache? #31

Open
jrgifford opened this issue Nov 7, 2014 · 1 comment
Open

apt-get cache? #31

jrgifford opened this issue Nov 7, 2014 · 1 comment

Comments

@jrgifford
Copy link

Is there a way to build these and make use of a apt-get cache such as what is outlined here? I have a slow connection, and I like to build my own boxes for various projects, with minor tweaks here and there.

Previously, I ran a squid-deb-proxy on my LAN and would install that package first, then would update and configure the boxes from that. Is that doable with packer/these images?

@kontrafiktion
Copy link

have you tried to set http_proxy and https_proxy when building the boxes with Packer?
As far as I can tell all packages are loaded via my local squid.

You have to have squid configured to cache .bz etc. like this:

refresh_pattern -i .rpm$ 129600 100% 129600 
refresh_pattern -i .bz2$ 129600 100% 129600 
refresh_pattern -i .deb$ 129600 100% 129600 

and you need a large object size:

 maximum_object_size 500 MB

and if the cache should survive a restart:

 cache_dir ufs /usr/local/var/cache/squid 10000 16 256

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants