File tree Expand file tree Collapse file tree 6 files changed +25
-25
lines changed Expand file tree Collapse file tree 6 files changed +25
-25
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,12 @@ cd plebnet-playground-docker
4848***
4949
5050``` sh
51- ARCH =x86_64-linux-gnu ./install.sh
51+ TRIPLET =x86_64-linux-gnu ./install.sh
5252```
5353
5454### Install and start just the ` bitcoind ` ,` lnd ` services (comma seperate them)
5555``` sh
56- ARCH =x86_64-linux-gnu services=bitcoind,lnd ./install.sh
56+ TRIPLET =x86_64-linux-gnu services=bitcoind,lnd ./install.sh
5757```
5858
5959### Stop containers
Original file line number Diff line number Diff line change 11FROM debian:buster-slim as builder
22
33ARG BITCOIN_VERSION=22.0
4- ARG ARCH =${ARCH }
4+ ARG TRIPLET =${TRIPLET }
55
66
77# RUN apt-add-repository ppa:bitcoin/bitcoin && apt-get update && apt-get install bitcoin
@@ -13,8 +13,8 @@ RUN apt-get update && \
1313WORKDIR /tmp
1414
1515# install bitcoin binaries
16- RUN BITCOIN_URL="https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${ARCH }.tar.gz" && \
17- BITCOIN_FILE="bitcoin-${BITCOIN_VERSION}-${ARCH }.tar.gz" && \
16+ RUN BITCOIN_URL="https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TRIPLET }.tar.gz" && \
17+ BITCOIN_FILE="bitcoin-${BITCOIN_VERSION}-${TRIPLET }.tar.gz" && \
1818 BITCOIN_SHA_URL="https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS" && \
1919 wget -qO "${BITCOIN_FILE}" "${BITCOIN_URL}" && wget -qO SHA256SUMS.asc "${BITCOIN_SHA_URL}" && \
2020 grep "${BITCOIN_FILE}" SHA256SUMS.asc | sha256sum -c - && \
Original file line number Diff line number Diff line change 1- ARG ARCH =amd64
1+ ARG TRIPLET =amd64
22FROM golang:1.14-alpine3.12 AS build-container
33USER root
44ENV GO111MODULE=on
@@ -10,9 +10,9 @@ WORKDIR /root/btcd
1010ARG BTCD_VERSION=63438c6d3661a7dec09013f7731035abdf1eb4bc
1111RUN git fetch --all && git checkout ${BTCD_VERSION}
1212RUN set -ex \
13- && if [ "${ARCH }" = "amd64" ]; then export GOARCH=amd64; fi \
14- && if [ "${ARCH }" = "arm32v7" ]; then export GOARCH=arm; fi \
15- && if [ "${ARCH }" = "arm64v8" ]; then export GOARCH=arm64; fi \
13+ && if [ "${TRIPLET }" = "amd64" ]; then export GOARCH=amd64; fi \
14+ && if [ "${TRIPLET }" = "arm32v7" ]; then export GOARCH=arm; fi \
15+ && if [ "${TRIPLET }" = "arm64v8" ]; then export GOARCH=arm64; fi \
1616 && echo "Compiling for $GOARCH" \
1717 && go install -v . ./cmd/...
1818
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ services:
66 context: ./bitcoin-signet
77 dockerfile: Dockerfile
88 args:
9- - ARCH =${ARCH }
9+ - TRIPLET =${TRIPLET }
1010 image: playground-docker-bitcoind
1111 links:
1212 - tor
@@ -15,7 +15,7 @@ services:
1515 restart: unless-stopped
1616 container_name: playground-bitcoind
1717 environment:
18- ARCH : ${ARCH }
18+ TRIPLET : ${TRIPLET }
1919 GET_COINS_ON_STARTUP: 'true'
2020 expose:
2121 - "38332"
@@ -35,7 +35,7 @@ services:
3535 - bitcoind
3636 - tor
3737 environment:
38- ARCH : '${ARCH }'
38+ TRIPLET : '${TRIPLET }'
3939 LND_ALIAS: 'NewNode'
4040 LND_LISTEN: 'playground-lnd:9735'
4141 LND_RPCLISTEN: 'playground-lnd:10009'
@@ -216,12 +216,12 @@ services:
216216 restart: unless-stopped
217217 container_name: playground-docs
218218 environment:
219- - ARCH =${ARCH }
219+ - TRIPLET =${TRIPLET }
220220 build:
221221 context: ${oc.env:PWD}/docs
222222 dockerfile: Dockerfile
223223 args:
224- - ARCH =${ARCH }
224+ - TRIPLET =${TRIPLET }
225225 expose:
226226 - "8000"
227227 ports:
Original file line number Diff line number Diff line change 11# if [ -z "$1" ]
22# then
3- # echo 'You must provide ARCH as first parameter'
3+ # echo 'You must provide TRIPLET as first parameter'
44# echo './install.sh x86_64-linux-gnu'
55# exit;
66# fi
77
8- # ARCH =$1
8+ # TRIPLET =$1
99
10- : ${ARCH := x86_64-linux-gnu}
10+ : ${TRIPLET := x86_64-linux-gnu}
1111: ${services:= Null}
1212
1313# Remove any old version
1414docker-compose down
1515
16- python plebnet_generate.py ARCH= $ARCH services=$services
16+ python plebnet_generate.py TRIPLET= $TRIPLET services=$services
1717
1818sudo rm -rf volumes
1919
@@ -27,5 +27,5 @@ mkdir volumes/tor_datadir
2727mkdir volumes/tor_servicesdir
2828mkdir volumes/tor_torrcdir
2929
30- docker-compose build --build-arg ARCH= $ARCH
30+ docker-compose build --build-arg TRIPLET= $TRIPLET
3131docker-compose up --remove-orphans -d
Original file line number Diff line number Diff line change 1818cli_args = OmegaConf .from_cli ()
1919
2020try :
21- arch = cli_args ['ARCH ' ]
21+ triplet = cli_args ['TRIPLET ' ]
2222except KeyError :
23- print ('Need to supply ARCH . Supported architectures:' )
23+ print ('Need to supply TRIPLET . Supported architectures:' )
2424 for k , v in architectures .items ():
25- print ('\t {}: ARCH ={}' .format (k , v ))
25+ print ('\t {}: TRIPLET ={}' .format (k , v ))
2626 sys .exit ()
2727
2828conf = OmegaConf .load ('docker-compose.yaml.template' )
2929
3030# merge in architecture
31- conf = OmegaConf .merge (OmegaConf .create (dict (ARCH = arch )), conf )
31+ conf = OmegaConf .merge (OmegaConf .create (dict (TRIPLET = triplet )), conf )
3232
3333
3434if 'services' in cli_args :
@@ -80,15 +80,15 @@ def get_services(services, required_services=set()):
8080 conf .services .pop (service_name )
8181
8282# dashboard keyword
83- conf ['USE_TEST_DATA' ] = cli_args .get ('ARCH ' , False )
83+ conf ['USE_TEST_DATA' ] = cli_args .get ('TRIPLET ' , False )
8484
8585try :
8686 OmegaConf .resolve (conf )
8787except :
8888 print (OmegaConf .to_yaml (conf ))
8989 raise
9090
91- conf .pop ('ARCH ' )
91+ conf .pop ('TRIPLET ' )
9292conf .pop ('USE_TEST_DATA' )
9393
9494with open ('docker-compose.yaml' , 'w' ) as f :
You can’t perform that action at this time.
0 commit comments