base: Use Debian package repository CDN

For improved reliability and performance
This commit is contained in:
Matt McCormick 2016-11-16 20:18:52 -05:00
parent 46e4b18ebf
commit 8dffb1d6d8

View File

@ -1,8 +1,8 @@
FROM debian:jessie FROM debian:jessie
MAINTAINER Matt McCormick "matt.mccormick@kitware.com" MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
RUN apt-get update && apt-get install -y curl && \ RUN REPO=http://cdn-fastly.deb.debian.org && \
sed -i "s/httpredir.debian.org/`curl -s -D - http://httpredir.debian.org/demo/debian/ | awk '/^Link:/ { print $2 }' | sed -e 's@<http://\(.*\)/debian/>;@\1@g'`/" /etc/apt/sources.list echo "deb $REPO/debian jessie main\ndeb $REPO/debian jessie-updates main\ndeb $REPO/debian-security jessie/updates main" > /etc/apt/sources.list
RUN apt-get update && apt-get -y install \ RUN apt-get update && apt-get -y install \
automake \ automake \