Sign inSign up

trinitronx/fastest-servers

By trinitronx

Updated almost 11 years ago

A Ruby Script to narrow down a list of mirrors to the fastest servers.

Image
0

1.6K

trinitronx/fastest-servers repository overview

Fastest Servers

Build Status Docker Pulls Docker Stars GitHub stars GitHub watchers GitHub forks GitHub issues Gittip

A Ruby Script to narrow down a list of mirrors to the fastest servers.

By default, use Ubuntu mirror list hosted at: http://mirrors.ubuntu.com/mirrors.txt

Outputs a mirrors.txt file to /tmp/ in the container. To capture this file for later use, pass through /tmp as a volume mount to Docker Container.

Configuration / Environment Variables

Variable NameDescriptionDefault
FASTEST_SERVER_LIST_TYPETells script what port to ping servers on. HTTP or NTP (Experimental)HTTP
FASTEST_SERVER_INITIAL_TIMEOUTInitial timeout in seconds used as limit for server ping timeout. If < 5 servers satisfy timeout, add 0.001 to this & retry until >= 5 servers found.0.050 (seconds)
MIRRORLIST_LOCAL_FILEIf specified, use this local file as mirror list input to find fastest servers in listnil
MIRRORLIST_HOSTGet MIRRORLIST_URL from this host and use as mirror list input for finding fastest serversmirrors.ubuntu.com
MIRRORLIST_URLGet this URL from MIRRORLIST_HOST & use as mirror list input/mirrors.txt
MIRRORLIST_PORTPort to contact MIRRORLIST_HOST on for getting MIRRORLIST_URL via HTTP80
FASTEST_SERVER_LIST_OUTPUTLocal file to output final filtered mirror list to. If using docker, ensure you volume mount enclosing directory from host/tmp/mirrors.txt
FASTEST_SERVER_DEBUGPuts script in DEBUG mode, which prints extra information to STDOUTnil

Example Usage

To output a list of fastest Ubuntu mirrors to /tmp/mirrors.txt:

sudo docker run -ti -v /tmp/:/tmp/ trinitronx/fastest-servers:latest

To run script in DEBUG mode, pass in environment variable -e FASTEST_SERVER_DEBUG=true:

sudo docker run -ti -e FASTEST_SERVER_DEBUG=true -v /tmp/:/tmp/ trinitronx/fastest-servers:latest

Tag summary

Content type

Image

Digest

sha256:28b9541a4

Size

99.5 MB

Last updated

almost 11 years ago

docker pull trinitronx/fastest-servers