提交 c6f17fd4 编写于 作者: N noprom

fix bug when run using docker-compose

上级 5b2695b1
......@@ -4,10 +4,11 @@ Simple and fast setup of EOS.IO on Docker is also available.
## Install Dependencies
- [Docker](https://docs.docker.com) Docker 17.05 or higher is required
- [docker-compose](https://docs.docker.com/compose/) version >= 1.10.0
## Docker Requirement
- At least 8GB RAM (Docker -> Preferences -> Advanced -> Memory -> 8GB or above)
## Build eos image
```bash
......@@ -43,10 +44,12 @@ curl http://127.0.0.1:8888/v1/chain/get_info
## Start both nodeos and walletd containers
```bash
docker-compose up
docker volume create --name=nodeos-data-volume
docker volume create --name=walletd-data-volume
docker-compose up -d
```
After `docker-compose up`, two services named nodeos and walletd will be started. nodeos service would expose ports 8888 and 9876 to the host. walletd service does not expose any port to the host, it is only accessible to cleos when runing cleos is running inside the walletd container as described in "Execute cleos commands" section.
After `docker-compose up -d`, two services named nodeos and walletd will be started. nodeos service would expose ports 8888 and 9876 to the host. walletd service does not expose any port to the host, it is only accessible to cleos when runing cleos is running inside the walletd container as described in "Execute cleos commands" section.
### Execute cleos commands
......@@ -54,7 +57,7 @@ After `docker-compose up`, two services named nodeos and walletd will be started
You can run the `cleos` commands via a bash alias.
```bash
alias cleos='docker-compose exec walletd /opt/eosio/bin/cleos -H nodeos'
alias cleos='docker-compose exec walletd /opt/eosio/bin/cleos -H nodeosd'
cleos get info
cleos get account inita
```
......
version: "4"
version: "3"
services:
builder:
......@@ -11,6 +11,7 @@ services:
context: .
image: eosio/eos
command: /opt/eosio/bin/nodeosd.sh
hostname: nodeosd
ports:
- 8888:8888
- 9876:9876
......@@ -22,6 +23,7 @@ services:
walletd:
image: eosio/eos
command: /opt/eosio/bin/keosd
hostname: walletd
links:
- nodeosd
volumes:
......@@ -29,4 +31,6 @@ services:
volumes:
nodeos-data-volume:
external: true
walletd-data-volume:
external: true
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册