diff --git a/Docker/README.md b/Docker/README.md index 9538a8ea6bab9142ed7665213bbee47b98c7e975..e62bb74d08dc7beb4470a1bf02ef4bbcee120430 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -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 ``` diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml index ae7e25df4085d0a98cdbff97ceceab44dc50f0c8..542f302452d166af0a977a616ecf038d6e15a577 100755 --- a/Docker/docker-compose.yml +++ b/Docker/docker-compose.yml @@ -1,4 +1,4 @@ -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