docker: pass proxy arguments to docker process
Building in Docker when behind a proxy requires passing the proxy variables.
Differential Revision: https://phab.mercurial-scm.org/D190
--- a/contrib/dockerlib.sh Thu Jul 27 14:15:26 2017 +0200
+++ b/contrib/dockerlib.sh Thu Jul 27 13:44:15 2017 +0200
@@ -38,5 +38,5 @@
echo RUN groupadd $DBUILDUSER -g `id -g` -o
echo RUN useradd $DBUILDUSER -u `id -u` -g $DBUILDUSER -o
fi
- ) | $DOCKER build --tag $CONTAINER -
+ ) | $DOCKER build --build-arg http_proxy --build-arg https_proxy --tag $CONTAINER -
}
--- a/contrib/dockerrpm Thu Jul 27 14:15:26 2017 +0200
+++ b/contrib/dockerrpm Thu Jul 27 13:44:15 2017 +0200
@@ -16,10 +16,10 @@
contrib/buildrpm --rpmbuilddir $RPMBUILDDIR --prepare $*
DSHARED=/mnt/shared
-$DOCKER run -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
+$DOCKER run -e http_proxy -e https_proxy -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
rpmbuild --define "_topdir $DSHARED" -ba $DSHARED/SPECS/mercurial.spec --clean
-$DOCKER run -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
+$DOCKER run -e http_proxy -e https_proxy -u $DBUILDUSER --rm -v $RPMBUILDDIR:$DSHARED $CONTAINER \
createrepo $DSHARED
cat << EOF > $RPMBUILDDIR/mercurial.repo