我使用以下标志启动了我的Node容器:
daemon=1
printtoconsole=1
testnet=1
rpcport=9332
rpcallowip=0.0.0.0/0
rpcuser=user
rpcpassword=password
rpcbind=0.0.0.0
server=1
我在我的
docker-compose
中打开了端口:node:
image: bitcoin-sv
container_name: 'node'
restart: always
ports:
- '9332:9332'
我可以在我的容器中调用bitcoin-cli的方法
docker exec -it node bash
root@9196d074e4d8:/opt/bitcoin-sv# ./bitcoin-cli getinfo
但我无法从curl中调用它
curl --user user --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo, "params": ["", 0.1, "donation", "seans outpost"] }' -H 'content-type: text/plain;' http://127.0.0.1:9332
Enter host password for user 'user':
curl: (52) Empty reply from server
我该如何从curl中调用它?也许我需要调用cli?