Skip to content

Commit

Permalink
COMP: Use Debian Fastly CDN
Browse files Browse the repository at this point in the history
Faster and more reliable
  • Loading branch information
thewtex committed Mar 29, 2017
1 parent 5bd898c commit f32dbbc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM debian:8
MAINTAINER Insight Software Consortium <community@itk.org>

# Insert this line before "RUN apt-get update" to dynamically
# replace httpredir.debian.org with a single working domain
# in attempt to "prevent" the "Error reading from server" error.
RUN apt-get update && apt-get install -y curl && \
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
# Faster and more reliable package repository
RUN REPO=http://cdn-fastly.deb.debian.org && \
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 install -y \
build-essential \
Expand Down

0 comments on commit f32dbbc

Please sign in to comment.