- clone this repository
git clone https://github.com/Doichain/docker.git
- build docker image
cd doichain-docker/node-only
docker build --no-cache -t doichain/node-only --build-arg DOICHAIN_VER=dc0.20.1.11 .
-
Run docker image
Parameters:
- -e RPC_PASSWORD= (optional) - if not given it will be generated by the start script - see ~/.doichain/doichain.conf
- -e TESTNET=true in case you run Testnet, if you run Mainnet, please remove
- -e DAPP_URL=http://localhost:4010 (optional) the URL of you local dApp (mainnet default: http://localhost:3000 testnet no default but use: http://localhost:4010)
#mainnet example
docker run -it -e RPC_PASSWORD=<my-rpc-password> --name doichain doichain/node-only
#testnet example
docker run -it -e TESTNET=true -p 18339:18339 -e RPC_PASSWORD=<my-rpc-password> --name doichain doichain/node-only
- Connect into docker container and check if node connects to testnet
docker exec -it doichain doichain-cli -getinfo
- Please ALWAYS backup your privatKeys! via
docker exec -it doichain doichain-cli getnewaddress
docker exec -it doichain doichain-cli dumpprivkey <address>
- Common wallet commands
docker exec -it doichain doichain-cli help #show all commands
docker exec -it doichain doichain-cli getblockchaininfo #shows blockchain status sync header, blocks etc.
docker exec -it doichain doichain-cli getpeerinfo #shows all connected peers
docker exec -it doichain doichain-cli listtransactions #list wallet transactions
docker exec -it doichain doichain-cli sendtoaddresss #sends DOI amount to address
docker exec -it doichain doichain-cli gettransaction <txid> #show a certain transactions details
docker exec -it doichain doichain-cli getrawtransaction <txid> #show a certain transactions details