Merge branch 'master' of github.com:sneak/docker-ubuntumirror
This commit is contained in:
commit
449d0f31a2
|
@ -1,4 +1,4 @@
|
|||
FROM phusion/baseimage:0.9.19
|
||||
FROM phusion/baseimage:0.11
|
||||
|
||||
VOLUME /var/mirror
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -16,7 +16,7 @@ debmirror \
|
|||
--no-source \
|
||||
-s ${MIRROR_CATEGORIES:-main,universe} \
|
||||
-h ${UBUNTU_MIRROR_SOURCE:-archive.ubuntu.com} \
|
||||
-d ${UBUNTU_MIRROR_PROJECTS:-bionic,bionic-updates,bionic-security,bionic-backports,xenial,xenial-updates,xenial-security,xenial-backports} \
|
||||
-d ${UBUNTU_MIRROR_PROJECTS:-bionic,bionic-updates,bionic-security,bionic-backports} \
|
||||
--ignore-small-errors \
|
||||
-r /ubuntu \
|
||||
--progress \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main universe
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main universe
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main universe
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main universe
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic main universe
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates main universe
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-backports main universe
|
||||
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security main universe
|
||||
|
|
Loading…
Reference in New Issue