Go to file
Jeffrey Paul b1e8729290 updated to xenial for fixed debmirror for translations
see https://bugs.launchpad.net/ubuntu/+source/debmirror/+bug/1565585
2016-09-12 11:14:06 +02:00
mirror now supports specifying projects via env vars 2016-09-01 03:38:03 +02:00
Dockerfile updated to xenial for fixed debmirror for translations 2016-09-12 11:14:06 +02:00
Makefile latest 2016-04-09 19:23:37 +02:00
README.markdown now supports specifying projects via env vars 2016-09-01 03:38:03 +02:00
docker-compose.yml actually works right now 2016-04-11 03:38:47 +02:00
mirror.run little tweaks 2016-04-11 02:26:57 +02:00
nginx.conf now serves /mirrors.txt to support ubuntu mirror:// urls 2016-04-11 04:36:47 +02:00
nginx.run initial 2016-04-08 22:41:48 +02:00
sources.list actually works right now 2016-04-11 03:38:47 +02:00

README.markdown

sneak/ubuntumirror

Docker container for syncing trusty and xenial 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

  • MIRROR_ARCHITECTURES
    • default amd64.
    • You may want i386,amd64.
  • MIRROR_CATEGORIES
    • default main,universe.
    • You may want main,universe,restricted,multiverse. Will use lots of disk.
  • UBUNTU_MIRROR_PROJECTS
    • default xenial,xenial-updates,xenial-security,xenial-backports.
    • You may want xenial,xenial-updates,xenial-security,xenial-backports,trusty,trusty-updates,trusty-security,trusty-backports
  • UBUNTU_MIRROR_SOURCE
    • default archive.ubuntu.com.
    • You may want xx.archive.ubuntu.com (where xx is your country code).
  • MIRROR_INTERVAL_SECONDS - mirror sync interval
    • default 43200 (12h)
    • You may want 10800 (3h)

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

Then, just add --dns 172.17.0.1 to your /etc/default/docker opts and bounce the docker daemon. Future containers will talk to your local mirror.