docker: pass proxy arguments to docker process stable
authorMathias De Maré <mathias.de_mare@nokia.com>
Thu, 27 Jul 2017 13:44:15 +0200
branchstable
changeset 33597 a3ac1ea611ce
parent 33596 af09413deb72
child 33598 f30714a55523
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
contrib/dockerlib.sh
contrib/dockerrpm
--- 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