2016-04-09 13:22:33 +00:00
|
|
|
# sneak/ubuntumirror
|
|
|
|
|
2019-01-25 03:12:31 +00:00
|
|
|
Docker container for syncing bionic ubuntu LTS mirrors
|
2016-04-09 13:22:33 +00:00
|
|
|
to reduce network traffic and speed up build times.
|
|
|
|
|
|
|
|
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.
|
2016-09-01 01:38:03 +00:00
|
|
|
* `UBUNTU_MIRROR_PROJECTS`
|
2018-10-01 22:02:57 +00:00
|
|
|
* default `xenial,xenial-updates,xenial-security,xenial-backports,bionic,bionic-updates,bionic-security,bionic-backports`.
|
2016-04-09 13:22:33 +00:00
|
|
|
* `UBUNTU_MIRROR_SOURCE`
|
|
|
|
* default `archive.ubuntu.com`.
|
|
|
|
* You may want `xx.archive.ubuntu.com` (where `xx` is your country
|
|
|
|
code).
|
2016-04-09 14:18:35 +00:00
|
|
|
* `MIRROR_INTERVAL_SECONDS` - mirror sync interval
|
|
|
|
* default `43200` (12h)
|
|
|
|
* You may want `10800` (3h)
|
2016-04-09 13:22:33 +00:00
|
|
|
|
|
|
|
# Example dnsmasq setup
|
|
|
|
|
|
|
|
```
|
2019-01-25 03:12:31 +00:00
|
|
|
apt update && apt -y install dnsmasq
|
|
|
|
echo address=/mirrors.ubuntu.com/172.17.0.1 > /etc/dnsmasq.d/ubuntu-mirror-local
|
2016-04-09 13:22:33 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
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.
|