How to use docker start EOSIO enviroment
Prepare in advance:
make sure that you already installed docker ,if you didn't install docker ,you can follow this guide:
https://docs.docker.com/install/
1. Pull docker image

2. start EOSIO
4.generate Cleos commands
5. we can check all the methods of Cleos
6. get the info
7. open brower
http://0.0.0.0:8888/v1/chain/get_info
8. close it
make sure that you already installed docker ,if you didn't install docker ,you can follow this guide:
https://docs.docker.com/install/
1. Pull docker image
docker pull eosio/eos-dev

2. start EOSIO
sudo docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /tmp/work:/work -v /tmp/eosio/data:/mnt/dev/data -v /tmp/eosio/config:/mnt/dev/config eosio/eos-dev /bin/bash -c "nodeos -e -p eosio --plugin eosio::wallet_api_plugin --plugin eosio::wallet_plugin --plugin eosio::producer_plugin --plugin eosio::history_plugin --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --plugin eosio::http_plugin -d /mnt/dev/data --config-dir /mnt/dev/config --http-server-address=0.0.0.0:8888 --access-control-allow-origin=* --contracts-console"3. make sure you already started it
sudo docker logs --tail 10 eosio
~$ sudo docker logs --tail 10 eosio
2018-07-22T13:09:54.000 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00001e42685a257e... #7746 @ 2018-07-22T13:09:54.000 signed by eosio [trxs: 0, lib: 7745, confirmed: 0]
2018-07-22T13:09:54.500 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00001e437d138bd4... #7747 @ 2018-07-22T13:09:54.500 signed by eosio [trxs: 0, lib: 7746, confirmed: 0]
2018-07-22T13:09:55.000 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00001e4465093b1e... #7748 @ 2018-07-22T13:09:55.000 signed by eosio [trxs: 0, lib: 7747, confirmed: 0]
2018-07-22T13:09:55.500 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00001e4569ee66e8... #7749 @ 2018-07-22T13:09:55.500 signed by eosio [trxs: 0, lib: 7748, confirmed: 0]
2018-07-22T13:09:56.000 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00001e46329f0e96... #7750 @ 2018-07-22T13:09:56.000 signed by eosio [trxs: 0, lib: 7749, confirmed: 0]
2018-07-22T13:09:56.500 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00001e47a866965c... #7751 @ 2018-07-22T13:09:56.500 signed by eosio [trxs: 0, lib: 7750, confirmed: 0]
2018-07-22T13:09:57.000 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00001e48fc250493... #7752 @ 2018-07-22T13:09:57.000 signed by eosio [trxs: 0, lib: 7751, confirmed: 0]
2018-07-22T13:09:57.500 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00001e49025c04ff... #7753 @ 2018-07-22T13:09:57.500 signed by eosio [trxs: 0, lib: 7752, confirmed: 0]
2018-07-22T13:09:58.000 thread-0 producer_plugin.cpp:1194 produce_block ] Produced block 00001e4aee5e20e1... #7754 @ 2018-07-22T13:09:58.000 signed by eosio [trxs: 0, lib: 7753, confirmed: 0]
2018-07-22T13:09:58.501 thread-0 producer_plugin.cpp:1194 produce_block
4.generate Cleos commands
alias cleos='docker exec -it eosio /opt/eosio/bin/cleos -u [url=http://0.0.0.0:888]http://0.0.0.0:888[/url]8'
5. we can check all the methods of Cleos
cleos --help
Command Line Interface to EOSIO Client
Usage: /opt/eosio/bin/cleos [OPTIONS] SUBCOMMAND
Options:
-h,--help Print this help message and exit
-u,--url TEXT=[url=http://localhost:8888/]http://localhost:8888/[/url]
the http/https URL where nodeos is running
--wallet-url TEXT=[url=http://localhost:8900/]http://localhost:8900/[/url]
the http/https URL where keosd is running
-r,--header pass specific HTTP header; repeat this option to pass multiple headers
-n,--no-verify don't verify peer certificate when using HTTPS
-v,--verbose output verbose actions on error
Subcommands:
version Retrieve version information
create Create various items, on and off the blockchain
get Retrieve various items and information from the blockchain
set Set or update blockchain state
transfer Transfer EOS from account to account
net Interact with local p2p network connections
wallet Interact with local wallet
sign Sign a transaction
push Push arbitrary transactions to the blockchain
multisig Multisig contract commands
system Send eosio.system contract action to the blockchain.
6. get the info
~$ cleos get info
{
"server_version": "75635168",
"chain_id": "cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f",
"head_block_num": 8172,
"last_irreversible_block_num": 8171,
"last_irreversible_block_id": "00001feb0ecd88090fed642364f82a201ebfe049354f7bc2f39e8e2ee0c8b2db",
"head_block_id": "00001fec0632e6d29b03e32d6583a4257e691f7bd1b231b2f3d8a09dc97679e4",
"head_block_time": "2018-07-22T13:13:27.000",
"head_block_producer": "eosio",
"virtual_block_cpu_limit": 200000000,
"virtual_block_net_limit": 1048576000,
"block_cpu_limit": 199900,
"block_net_limit": 1048576
}
7. open brower
http://0.0.0.0:8888/v1/chain/get_info
8. close it
docker stop eosio
No any search results
You already invited:
0 Answers