Patchwork D190: docker: pass proxy arguments to docker process

login
register
mail settings
Submitter phabricator
Date July 27, 2017, 7:59 p.m.
Message ID <e8127adbc3174f3015b2fb7caf52382d@localhost.localdomain>
Download mbox | patch
Permalink /patch/22569/
State Not Applicable
Headers show

Comments

phabricator - July 27, 2017, 7:59 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa3ac1ea611ce: docker: pass proxy arguments to docker process (authored by Mathiasdm).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D190?vs=426&id=431

REVISION DETAIL
  https://phab.mercurial-scm.org/D190

AFFECTED FILES
  contrib/dockerlib.sh
  contrib/dockerrpm

CHANGE DETAILS




To: Mathiasdm, #hg-reviewers, durin42
Cc: durin42, mercurial-devel

Patch

diff --git a/contrib/dockerrpm b/contrib/dockerrpm
--- a/contrib/dockerrpm
+++ b/contrib/dockerrpm
@@ -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
diff --git a/contrib/dockerlib.sh b/contrib/dockerlib.sh
--- a/contrib/dockerlib.sh
+++ b/contrib/dockerlib.sh
@@ -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 -
 }