Skip to content

Instantly share code, notes, and snippets.

@bkmeneguello
Last active October 10, 2018 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkmeneguello/54a84b678e05ec706b54a6239ef2e829 to your computer and use it in GitHub Desktop.
Save bkmeneguello/54a84b678e05ec706b54a6239ef2e829 to your computer and use it in GitHub Desktop.
Docker deb cache
# host
apt-get install apt-cacher-ng
# dockerfile
ARG APT_CACHE
RUN [ ! -z "$APT_CACHE" ] && echo "Acquire::http::Proxy \"http://$APT_CACHE\";" > /etc/apt/apt.conf.d/30proxy ||:
# docker build
docker build --build-arg APT_CACHE=$HOST_IP:3142 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment