Public Repository

Last pushed: 2 years ago
Short Description
Test fastest apt mirror for current region and setup /etc/apt/sources.list
Full Description

Source on github

Dockerfile

FROM ubuntu:14.04 

MAINTAINER Evgeniy Klemin "evgeniy.klemin@gmail.com"

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install -y \
        wget \
    && rm -rf /var/lib/apt/lists/*

RUN wget -q -nv -O- http://ftp.ru.debian.org/debian/pool/main/n/netselect/netselect_0.3.ds1-26_amd64.deb > /tmp/netselect_0.3.ds1-26_amd64.deb
RUN dpkg -i /tmp/netselect_0.3.ds1-26_amd64.deb
RUN netselect -s1 -t20 `wget -q -nv -O- https://launchpad.net/ubuntu/+archivemirrors | grep -P -B8 "statusUP|statusSIX" | grep -o -P "(f|ht)tp.*\"" | tr '"\n' '  '` 2>/dev/null | awk '{ print $2 }' > /fastest-mirror
RUN MIRROR=`cat /fastest-mirror` && sed -i "s#http://archive.ubuntu.com/ubuntu/#$MIRROR#g" /etc/apt/sources.list
Docker Pull Command
Owner
evgeniyklemin