Allow the user to use bitcoin-cli inside the container instead of the host's

This commit is contained in:
nicolas.dorier 2017-10-23 14:36:21 +09:00
parent 375a2e1f98
commit 6dcaf43271
4 changed files with 5 additions and 14 deletions

View File

@ -4,17 +4,14 @@ This docker-compose shows how to configure postgres, bitcoind, NBXplorer and BTC
It exposes BTCPay on the host address http://localhost:8080/.
It also exposes Bitcoin Core RPC which you can access through port 8081:
If you need to access bitcoind RPC, you can use bitcoin-cli inside the container:
To access it, you can use:
On Powershell:
```
bitcoin-cli -conf="$pwd/bitcoin.conf" getblockcount
.\docker-bitcoin-cli getblockcount
```
On Linux:
```
bitcoin-cli -conf="`pwd`/bitcoin.conf" getblockcount
docker exec -ti btcpayserver_regtest_bitcoind bitcoin-cli -regtest -conf="/data/bitcoin.conf" -datadir="/data" getblockcount
```

View File

@ -1,4 +0,0 @@
regtest=1
rpcport=8081
rpcpassword=DwubwWsoo3
rpcuser=ceiwHEbqWI83

View File

@ -0,0 +1 @@
docker exec -ti btcpayserver_regtest_bitcoind bitcoin-cli -regtest -conf="/data/bitcoin.conf" -datadir="/data" $args

View File

@ -33,13 +33,10 @@ services:
- bitcoind
bitcoind:
container_name: btcpayserver_regtest_bitcoind
image: nicolasdorier/docker-bitcoin:0.15.0.1
environment:
BITCOIN_EXTRA_ARGS: "rpcuser=ceiwHEbqWI83\nrpcpassword=DwubwWsoo3\nregtest=1\nrpcport=43782\nport=8332"
BITCOIN_RPC_USER: ceiwHEbqWI83
BITCOIN_RPC_PASSWORD: DwubwWsoo3
ports:
- 8081:43782
expose:
- "43782"
- "8332"