Skip to content

start_a_wallet_by_docker

tututt edited this page Jan 6, 2018 · 3 revisions

start a wallet by docker

1.install docker

Please download Docker firstly

after downloading and installing, you can use docker --versionto make sure whether success or not

2.download cli-wallet image

use following command

docker pull gxbdevelop/cli-wallet

if you see these, that download successfully

latest: Pulling from gxbdevelop/cli-wallet

Digest: sha256:2af8be6cb7385eabcc6a55db2423524500b4e70ed8872237cc6d541f67272400

Status: Downloaded newer image for gxbdevelop/cli-wallet:latest

3.run cli-wallet image

  • Create a folder: for example, named "gxb-cli-wallet", and enter the path

cd gxb-cli-wallet

  • Create a new file named wallet.json(cli-wallet initialization file), and copy the following to the new file, every key can have it value

{

"chain_id": "",

"my_accounts": [],

"cipher_keys": "",

"extra_keys": [],

"pending_account_registrations": [],

"pending_witness_registrations": [],

"labeled_keys": [],

"blind_receipts": [],

"ws_server": "",

"ws_user": "",

"ws_password": ""

}

  • run cli-wallet image

docker run -e ws_server='wss://node15.gxb.io' -e rpc_endpoint='0.0.0.0:8091' -e data_dir='trust_node' -e wallet_file='wallet.json' -p 8091:8091 --name="gxb-cli-wallet" cli-wallet

introduction to the parameters of environmental variables:

ws_server:witness node rpc endpoint

rpc_endpoint:cli-wallet rpc endpoint, in docker, we can just use port 8091

data_dir:Directory containing databases, for cli_wallet write logs

wallet_file:wallet json file