From 060196ee4cdf2d60800faef67662989d74f5c03a Mon Sep 17 00:00:00 2001 From: Andrew Hsu Date: Sun, 20 Nov 2016 14:14:51 -0800 Subject: [PATCH] allow replacing httpredir or deb mirror in jessie Signed-off-by: Andrew Hsu --- Dockerfile | 9 ++++----- Dockerfile.armhf | 4 ++++ Dockerfile.simple | 4 ++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 93aed88993..07b5ee2a7d 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