Skip to content

Instantly share code, notes, and snippets.

@zeridon
Created December 22, 2015 17:15
Show Gist options
  • Save zeridon/ea98c0acd31e23877ff8 to your computer and use it in GitHub Desktop.
Save zeridon/ea98c0acd31e23877ff8 to your computer and use it in GitHub Desktop.
# various speedups
RUN echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup
# use apt-cacher-ng (if running)
RUN echo "HEAD /" | nc $(route -n | awk '/^0.0.0.0/ {print $2}') 3142 && \
(echo "Acquire::http::Proxy \"http://$(route -n | awk '/^0.0.0.0/ {print $2}'):3142\";" > /etc/apt/apt.conf.d/30proxy) || \
echo "No Apt-Cacher-NG detected on docker host"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment