Skip to content

Commit f208660

Browse files
committed
Support docker based Gitian builds
Requires a gitian-builder version with devrandom/gitian-builder#181 This will also switch to use Docker by default.
1 parent 6041373 commit f208660

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

contrib/gitian-build.sh

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ commit=false
2020
url=https://github.com/dashpay/dash
2121
proc=2
2222
mem=2000
23-
lxc=true
23+
lxc=false
24+
docker=true
2425
osslTarUrl=http://downloads.sourceforge.net/project/osslsigncode/osslsigncode/osslsigncode-1.7.1.tar.gz
2526
osslPatchUrl=https://bitcoincore.org/cfields/osslsigncode-Backports-to-1.7.1.patch
2627
scriptName=$(basename -- "$0")
@@ -47,8 +48,10 @@ Options:
4748
-o|--os Specify which Operating Systems the build is for. Default is lwx. l for linux, w for windows, x for osx
4849
-j Number of processes to use. Default 2
4950
-m Memory to allocate in MiB. Default 2000
50-
--kvm Use KVM instead of LXC
51-
--setup Setup the gitian building environment. Uses KVM. If you want to use lxc, use the --lxc option. Only works on Debian-based systems (Ubuntu, Debian)
51+
--kvm Use KVM
52+
--lxc Use LXC
53+
--docker Use Docker
54+
--setup Setup the gitian building environment. Uses KVM. If you want to use lxc, use the --lxc option. If you want to use Docker, use --docker. Only works on Debian-based systems (Ubuntu, Debian)
5255
--detach-sign Create the assert file for detached signing. Will not commit anything.
5356
--no-commit Do not commit anything to git
5457
-h|--help Print this help message
@@ -153,8 +156,19 @@ while :; do
153156
fi
154157
;;
155158
# kvm
159+
--lxc)
160+
lxc=true
161+
docker=false
162+
;;
163+
# kvm
156164
--kvm)
157165
lxc=false
166+
docker=false
167+
;;
168+
# docker
169+
--docker)
170+
lxc=false
171+
docker=true
158172
;;
159173
# Detach sign
160174
--detach-sign)
@@ -181,6 +195,9 @@ then
181195
export USE_LXC=1
182196
export LXC_BRIDGE=lxcbr0
183197
sudo ifconfig lxcbr0 up 10.0.3.2
198+
elif [[ $docker = true ]]
199+
then
200+
export USE_DOCKER=1
184201
fi
185202

186203
# Check for OSX SDK
@@ -240,6 +257,10 @@ then
240257
then
241258
sudo apt-get install lxc
242259
bin/make-base-vm --suite trusty --arch amd64 --lxc
260+
elif [[ -n "$USE_DOCKER" ]]
261+
then
262+
sudo apt-get install docker-ce
263+
bin/make-base-vm --suite trusty --arch amd64 --docker
243264
else
244265
bin/make-base-vm --suite trusty --arch amd64
245266
fi

0 commit comments

Comments
 (0)