Created
March 26, 2020 16:33
-
-
Save ptisserand/d2ceaea6f4ce4f9c86663bb823249164 to your computer and use it in GitHub Desktop.
Start a proxy to speed up docker build
This file contains hidden or 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
#!/bin/bash | |
CACHE_DIR=/srv/squid/cache | |
echo "Starting squid container" | |
docker run --rm --net host -v ${CACHE_DIR}:/var/cache/squid3 -d jpetazzo/squid-in-a-can | |
echo "Setup iptables" | |
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 3129 -w |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment