diff --git a/Dockerfile b/Dockerfile index fe13206..93c5c8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM phusion/baseimage:0.9.19 +FROM phusion/baseimage:0.11 VOLUME /var/mirror diff --git a/README.markdown b/README.markdown index 4566c19..4c43968 100644 --- a/README.markdown +++ b/README.markdown @@ -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 <> /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 diff --git a/mirror/syncubuntu.sh b/mirror/syncubuntu.sh index 4415b38..578b97e 100755 --- a/mirror/syncubuntu.sh +++ b/mirror/syncubuntu.sh @@ -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 \ diff --git a/sources.list b/sources.list index a010ec7..dee5a16 100644 --- a/sources.list +++ b/sources.list @@ -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