aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2026-06-04 19:33:21 +0000
committertobtoht <tob@featherwallet.org>2026-06-04 19:33:21 +0000
commit34c9abfc4c43adf52e3eb67424ac0d70a6c5f655 (patch)
treea41e896cc7976f36684903e6ac7a733505205881 /contrib
parentf4bddf8b2ca89ea1fb96c3f5c00b5cc43a773aa6 (diff)
parent874b7eb0b3a8b753f5488c0b004f121ff08a5eb3 (diff)
downloadmonzero-core-34c9abfc4c43adf52e3eb67424ac0d70a6c5f655.tar.gz
monzero-core-34c9abfc4c43adf52e3eb67424ac0d70a6c5f655.tar.xz
monzero-core-34c9abfc4c43adf52e3eb67424ac0d70a6c5f655.zip
Merge pull request #10660
874b7eb gitian: optional APT cacher for docker builds (vdo)
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/gitian/dockrun.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/gitian/dockrun.sh b/contrib/gitian/dockrun.sh
index 396db126b..63aa6eef6 100755
--- a/contrib/gitian/dockrun.sh
+++ b/contrib/gitian/dockrun.sh
@@ -9,12 +9,18 @@ VERSION=$1
DOCKER=`command -v docker`
CACHER=`command -v apt-cacher-ng`
-if [ -z "$DOCKER" -o -z "$CACHER" ]; then
- echo "$0: you must first install docker.io and apt-cacher-ng"
- echo " e.g. sudo apt-get install docker.io apt-cacher-ng"
+if [ -z "$DOCKER" ]; then
+ echo "$0: you must first install docker.io"
+ echo " e.g. sudo apt-get install docker.io"
exit 1
fi
+# only use APT cacher if package is present
+DOCKER_CACHE_LINE=""
+if [ "$CACHER" ]; then
+ DOCKER_CACHE_LINE="RUN echo 'Acquire::http { Proxy \"http://172.17.0.1:3142\"; };' > /etc/apt/apt.conf.d/50cacher"
+fi
+
GH_USER=${GH_USER-$USER}
TAG=gitrun-bionic
@@ -33,7 +39,7 @@ cat <<EOF > ${TAG}.Dockerfile
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
-RUN echo 'Acquire::http { Proxy "http://172.17.0.1:3142"; };' > /etc/apt/apt.conf.d/50cacher
+$DOCKER_CACHE_LINE
RUN echo "$GID" >> /etc/group
RUN apt-get update && apt-get --no-install-recommends -y install lsb-release ruby git make wget docker.io python3 curl
@@ -66,7 +72,7 @@ cat <<EOF > ${TAG2}.Dockerfile
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
-RUN echo 'Acquire::http { Proxy "http://172.17.0.1:3142"; };' > /etc/apt/apt.conf.d/50cacher
+$DOCKER_CACHE_LINE
RUN apt-get update && apt-get --no-install-recommends -y install build-essential git language-pack-en \
wget lsb-release curl gcc-7 g++-7 gcc g++ binutils-gold pkg-config autoconf libtool automake faketime \
bsdmainutils ca-certificates python cmake gperf