diff --git a/Dockerfile b/Dockerfile index 9d344c813e..fdd819771e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,16 +25,15 @@ FROM debian:jessie +# allow replacing httpredir or deb mirror +ARG APT_MIRROR=deb.debian.org +RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list + # Add zfs ppa RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys E871F18B51E0147C77796AC81196BA81F6B0FC61 \ || apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys E871F18B51E0147C77796AC81196BA81F6B0FC61 RUN echo deb http://ppa.launchpad.net/zfs-native/stable/ubuntu trusty main > /etc/apt/sources.list.d/zfs.list - -# Allow replacing httpredir mirror -ARG APT_MIRROR=httpredir.debian.org -RUN sed -i s/httpredir.debian.org/$APT_MIRROR/g /etc/apt/sources.list - # Packaged dependencies RUN apt-get update && apt-get install -y \ apparmor \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 7f213f8f60..8b3a9cc68e 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -17,6 +17,10 @@ FROM armhf/debian:jessie +# allow replacing httpredir or deb mirror +ARG APT_MIRROR=deb.debian.org +RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list + # Packaged dependencies RUN apt-get update && apt-get install -y \ apparmor \ diff --git a/Dockerfile.simple b/Dockerfile.simple index 4a15a381d2..289d2f596b 100644 --- a/Dockerfile.simple +++ b/Dockerfile.simple @@ -7,6 +7,10 @@ FROM debian:jessie +# allow replacing httpredir or deb mirror +ARG APT_MIRROR=deb.debian.org +RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list + # Compile and runtime deps # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#build-dependencies # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies