docker: enable docker-compose up command for btc and ltc compose files

This commit is contained in:
yancy ribbens
2019-02-25 07:45:47 -06:00
committed by yancy
parent 883f9e5f9a
commit 1f457ac1a8
5 changed files with 81 additions and 88 deletions

View File

@@ -68,7 +68,7 @@ docker volume create simnet_lnd_alice
docker volume create simnet_lnd_bob
# Run the "Alice" container and log into it:
$ docker-compose run -d --name alice --volume simnet_lnd_alice:/root/.lnd lnd_btc
$ docker-compose run -d --name alice --volume simnet_lnd_alice:/root/.lnd lnd
$ docker exec -i -t alice bash
# Generate a new backward compatible nested p2sh address for Alice:
@@ -79,10 +79,10 @@ $ MINING_ADDRESS=<alice_address> docker-compose up -d btcd
# Generate 400 blocks (we need at least "100 >=" blocks because of coinbase
# block maturity and "300 ~=" in order to activate segwit):
$ docker-compose run btcctl generate 400
$ docker exec -it btcd /start-btcctl.sh generate 400
# Check that segwit is active:
$ docker-compose run btcctl getblockchaininfo | grep -A 1 segwit
$ docker exec -it btcd /start-btcctl.sh getblockchaininfo | grep -A 1 segwit
```
Check `Alice` balance:
@@ -94,7 +94,7 @@ Connect `Bob` node to `Alice` node.
```bash
# Run "Bob" node and log into it:
$ docker-compose run -d --name bob --volume simnet_lnd_bob:/root/.lnd lnd_btc
$ docker-compose run -d --name bob --volume simnet_lnd_bob:/root/.lnd lnd
$ docker exec -i -t bob bash
# Get the identity pubkey of "Bob" node:
@@ -163,7 +163,7 @@ Create the `Alice<->Bob` channel.
alice$ lncli --network=simnet openchannel --node_key=<bob_identity_pubkey> --local_amt=1000000
# Include funding transaction in block thereby opening the channel:
$ docker-compose run btcctl generate 3
$ docker exec -it btcd /start-btcctl.sh generate 3
# Check that channel with "Bob" was opened:
alice$ lncli --network=simnet listchannels
@@ -247,7 +247,7 @@ alice$ lncli --network=simnet listchannels
alice$ lncli --network=simnet closechannel --funding_txid=<funding_txid> --output_index=<output_index>
# Include close transaction in a block thereby closing the channel:
$ docker-compose run btcctl generate 3
$ docker exec -it btcd /start-btcctl.sh generate 3
# Check "Alice" on-chain balance was credited by her settled amount in the channel:
alice$ lncli --network=simnet walletbalance
@@ -299,10 +299,7 @@ First of all you need to run `btcd` node in `testnet` and wait for it to be
synced with test network (`May the Force and Patience be with you`).
```bash
# Init bitcoin network env variable:
$ export NETWORK="testnet"
# Run "btcd" node:
$ docker-compose up -d "btcd"
$ NETWORK="testnet" docker-compose up
```
After `btcd` synced, connect `Alice` to the `Faucet` node.