passage à squid, de la VM aux dockers
This commit is contained in:
@ -25,10 +25,16 @@ export DebugLog="${VAGRANT_SRC_DIR}/log/log-vagrant-$(date +%y-%m-%d-%T)-"
|
||||
apt-get --allow-releaseinfo-change update
|
||||
|
||||
# Cache APT
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y apt-cacher # apt-cacher-ng does not work well on bullseye
|
||||
echo "allowed_hosts = *" >> /etc/apt-cacher/apt-cacher.conf
|
||||
service apt-cacher restart
|
||||
#DEBIAN_FRONTEND=noninteractive apt-get install -y apt-cacher # apt-cacher-ng does not work well on bullseye
|
||||
#echo "allowed_hosts = *" >> /etc/apt-cacher/apt-cacher.conf
|
||||
#service apt-cacher restart
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y squid
|
||||
sed -i -e "s/#http_access allow localnet/http_access allow localnet/" /etc/squid/squid.conf
|
||||
echo "cache_dir aufs /var/spool/squid 5000 14 256
|
||||
http_port 3142" >> /etc/squid/squid.conf
|
||||
service squid restart
|
||||
echo "Acquire::http::Proxy \"http://127.0.0.1:3142\";" > /etc/apt/apt.conf.d/01proxy; # utilisation de apt-cacher-ng
|
||||
# Ajouter http://www.squid-cache.org/Doc/config/cache_peer/ à squid pour un proxy upstream
|
||||
|
||||
# MAJ et Install
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
|
||||
|
Reference in New Issue
Block a user