Files
firestuff/markdown/2016-04-02-apt-caching-for-debootstrap.md

24 lines
771 B
Markdown
Raw Permalink Normal View History

2019-04-14 22:45:25 +00:00
<!--# set var="title" value="apt caching for debootstrap" -->
2019-04-25 02:45:09 +00:00
<!--# set var="date" value="2016-04-02" -->
2019-04-14 22:45:25 +00:00
<!--# include file="include/top.html" -->
If youre building system images, youre going to do a lot of debootstrap, which is going to fetch a lot of packages. On a fast system, thatll be the slowest part of the process. Heres how to cache.
## Install apt-cacher-ng
2019-04-14 22:45:25 +00:00
sudo apt-get install squid-deb-proxy
## Tell programs to use the proxy
2019-04-14 22:45:25 +00:00
export http_proxy=http://127.0.0.1:8000
# Note that you'll need to re-export this before any use of debootstrap
## Tell sudo to pass through http\_proxy
2019-04-14 22:45:25 +00:00
sudo visudo
# Add the line after the env_reset line:
Defaults env_keep += "http_proxy"
<!--# include file="include/bottom.html" -->