scripts: install bitcoind binary from docker image
Because the bitcoind mirror is extremely slow, we spend at least 2 to 3 minutes of each bitcoind related test on just downloading the binary. We can achieve the same result by just pulling the docker image and extracting the binary from that.
This commit is contained in:
parent
7e1d825834
commit
785e797ef8
@ -2,17 +2,9 @@
|
|||||||
|
|
||||||
set -ev
|
set -ev
|
||||||
|
|
||||||
export BITCOIND_VERSION=0.20.0
|
BITCOIND_VERSION=${BITCOIN_VERSION:-0.20.1}
|
||||||
|
|
||||||
if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind
|
|
||||||
then
|
|
||||||
echo "found cached bitcoind"
|
|
||||||
else
|
|
||||||
mkdir -p ~/bitcoin && \
|
|
||||||
pushd ~/bitcoin && \
|
|
||||||
wget https://bitcoin.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \
|
|
||||||
tar xvfz bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \
|
|
||||||
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind && \
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
docker pull ruimarinho/bitcoin-core:$BITCOIND_VERSION
|
||||||
|
CONTAINER_ID=$(docker create ruimarinho/bitcoin-core:$BITCOIND_VERSION)
|
||||||
|
sudo docker cp $CONTAINER_ID:/opt/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind
|
||||||
|
docker rm $CONTAINER_ID
|
||||||
|
Loading…
Reference in New Issue
Block a user