Merge branch 'master' of github.com:sneak/docker-ubuntumirror

This commit is contained in:
2019-01-25 03:12:31 +00:00
4 changed files with 9 additions and 20 deletions

View File

@@ -1,13 +1,8 @@
# sneak/ubuntumirror
Docker container for syncing trusty and xenial ubuntu LTS mirrors
Docker container for syncing bionic ubuntu LTS mirrors
to reduce network traffic and speed up build times.
I recommend deploying this with a `--dns 172.17.0.1` in your
`/etc/default/docker` and dnsmasq bound to 172.17.0.1:53 to rewrite
`archive.ubuntu.com` to `172.17.0.1` (which this image will be listening and
serving on).
Then even your builds (where you can't specify links) will go fast.
# Levers
@@ -32,14 +27,8 @@ Then even your builds (where you can't specify links) will go fast.
# Example dnsmasq setup
```
apt-get update && apt-get -y install dnsmasq
cat > /etc/dnsmasq.d/docker <<EOF
no-resolv
server=8.8.8.8
server=8.8.4.4
EOF
echo "172.17.0.1 archive.ubuntu.com" >> /etc/hosts
service dnsmasq restart
apt update && apt -y install dnsmasq
echo address=/mirrors.ubuntu.com/172.17.0.1 > /etc/dnsmasq.d/ubuntu-mirror-local
```
Then, just add `--dns 172.17.0.1` to your /etc/default/docker opts