# HG changeset patch # User Mathias De Maré # Date 2017-07-27 11:44:15 # Node ID a3ac1ea611cef317710e886b9ff9b3fa7a03db41 # Parent af09413deb725ace4206bdf68a7a80c9b84760d1 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 diff --git a/contrib/dockerlib.sh b/contrib/dockerlib.sh --- a/contrib/dockerlib.sh +++ b/contrib/dockerlib.sh @@ -38,5 +38,5 @@ function initcontainer() { 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 - } diff --git a/contrib/dockerrpm b/contrib/dockerrpm --- a/contrib/dockerrpm +++ b/contrib/dockerrpm @@ -16,10 +16,10 @@ RPMBUILDDIR=$ROOTDIR/packages/$PLATFORM 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