changeset 33597:a3ac1ea611ce stable

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
author Mathias De Maré <mathias.de_mare@nokia.com>
date Thu, 27 Jul 2017 13:44:15 +0200
parents af09413deb72
children f30714a55523
files contrib/dockerlib.sh contrib/dockerrpm
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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