Last active
October 10, 2018 13:40
-
-
Save bkmeneguello/54a84b678e05ec706b54a6239ef2e829 to your computer and use it in GitHub Desktop.
Docker deb cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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