windows-x86: Replace Debian sources URL's

"Error reading from server", "connection lost" error occur. Use workaround of
using a specific debian mirror as suggested here:

  https://stackoverflow.com/questions/32304631/docker-debian-apt-error-reading-from-server
This commit is contained in:
Matt McCormick 2016-07-10 01:19:09 -04:00
parent 30e29f3bbb
commit 962a1ecb11
2 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,11 @@
FROM thewtex/cross-compiler-base
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
# 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 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
# WINE is used as an emulator for try_run and tests with CMake.
# Other dependencies are from the listed MXE requirements:
# http://mxe.cc/#requirements

View File

@ -1,6 +1,11 @@
FROM thewtex/cross-compiler-base
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
# 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 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
# WINE is used as an emulator for try_run and tests with CMake.
# Other dependencies are from the listed MXE requirements:
# http://mxe.cc/#requirements