create account

Easy Docker Guide for EOS by clayop

View this thread on: hive.blogpeakd.comecency.com
· @clayop ·
$75.58
Easy Docker Guide for EOS
![](https://steemitimages.com/DQmbV9dDJg3EKs6iq1G4gmB4gfkg7EdCPsJFEuHfzVf29iU/eos.jpeg)

My previous post [EOS Build Guide on Ubuntu](https://steemit.com/eoskorea/@clayop/eos-build-guide-on-ubunbu) provides instructions to build EOS on native machine. But Docker has many advantages, especially compatibility, so that providing information for Docker users sounds a good idea to me. This post is a brief guide of using EOS (`eosd`, `eosc`). Example contracts are not available since Dockerfile in the official repo deletes them after building, but I think we can make easy modifications soon.

## Install Docker
~~~
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce git
sudo systemctl status docker
~~~

## Install Docker-compose (maybe optional)
~~~
sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)"
sudo chmod +x /usr/local/bin/docker-compose
docker-compose -v
sudo usermod -aG docker $USER
~~~

## Build docker image
~~~
screen -S dockerbuild
git clone https://github.com/EOSIO/eos
cd eos/Docker
cp ../genesis.json .
~~~
We need to add plugin to use eosc, until EOS devs fix it.
`nano config.ini`

Add the following
`plugin = eos::chain_api_plugin`

Build
~~~
sudo docker build --rm -t eosio/eos .
~~~


## Optional
~~~
sudo rm -rf /data/store/eos
sudo mkdir -p /data/store/eos
~~~

## Run Docker
~~~
sudo docker run --rm --name eos -d -p 8888:8888 -p 9876:9876 eosio/eos
sudo docker logs --tail 10 eos    # Check log
~~~

## Run eosc
~~~
sudo docker exec eos /opt/eos/bin/eosc info
sudo docker exec eos /opt/eos/bin/eosc create key
sudo docker exec eos /opt/eos/bin/eosc create account eos tester EOS4toFS3YXEQCkuuw1aqDLrtHim86Gz9u3hBdcBw5KNPZcursVHq EOS6KdkmwhPyc2wxN9SAFwo2PU2h74nWs7urN1uRduAwkcns2uXsa
sudo docker exec eos /opt/eos/bin/eosc transfer eos tester 1000
sudo docker exec eos /opt/eos/bin/eosc account tester
~~~

(Example contracts are under `tmp/eos/contracts` which were deleted in [Dockerfile](https://github.com/EOSIO/eos/blob/master/Docker/Dockerfile#L49))
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 108 others
👎  
properties (23)
authorclayop
permlinkeasy-docker-guide-for-eos
categoryeoskorea
json_metadata{"tags":["eoskorea","eosdev","eos","coinkorea"],"image":["https://steemitimages.com/DQmbV9dDJg3EKs6iq1G4gmB4gfkg7EdCPsJFEuHfzVf29iU/eos.jpeg"],"links":["https://steemit.com/eoskorea/@clayop/eos-build-guide-on-ubunbu","https://github.com/EOSIO/eos/blob/master/Docker/Dockerfile#L49"],"app":"steemit/0.1","format":"markdown"}
created2017-07-27 22:37:00
last_update2017-07-27 22:37:00
depth0
children10
last_payout2017-08-03 22:37:00
cashout_time1969-12-31 23:59:59
total_payout_value65.041 HBD
curator_payout_value10.538 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,294
author_reputation270,845,899,918,618
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id9,958,921
net_rshares20,757,917,860,296
author_curate_reward""
vote details (173)
@coininstant ·
$0.16
Thanks, this is going to be fun!
👍  
properties (23)
authorcoininstant
permlinkre-clayop-easy-docker-guide-for-eos-20170728t051124652z
categoryeoskorea
json_metadata{"tags":["eoskorea"],"app":"steemit/0.1"}
created2017-07-28 05:11:24
last_update2017-07-28 05:11:24
depth1
children0
last_payout2017-08-04 05:11:24
cashout_time1969-12-31 23:59:59
total_payout_value0.156 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length32
author_reputation88,202,051,736,087
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id9,984,514
net_rshares42,771,356,299
author_curate_reward""
vote details (1)
@cyberspace ·
## Just posted this article that talks about EOS as the 4th generation blockchain challenge for Steem. ## 
https://steemitimages.com/DQmRj5vsX2buwAg5p1SSanzfZQ71NoH4LPKTVvAr5QQKWeK/gold-bar-1.jpg
# Analysis of Steem's Economy - A Social Scientist's First Impressions - Part 3/4 in the series. #
https://steemit.com/steemit/@cyberspace/analysis-of-steem-s-economy-a-social-scientist-s-first-impressions-part-3-4
properties (22)
authorcyberspace
permlinkre-clayop-easy-docker-guide-for-eos-20170727t230445942z
categoryeoskorea
json_metadata{"tags":["eoskorea"],"image":["https://steemitimages.com/DQmRj5vsX2buwAg5p1SSanzfZQ71NoH4LPKTVvAr5QQKWeK/gold-bar-1.jpg"],"links":["https://steemit.com/steemit/@cyberspace/analysis-of-steem-s-economy-a-social-scientist-s-first-impressions-part-3-4"],"app":"steemit/0.1"}
created2017-07-27 23:04:57
last_update2017-07-27 23:04:57
depth1
children0
last_payout2017-08-03 23:04:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length410
author_reputation780,337,768,524
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id9,960,746
net_rshares0
@eosint ·
$5.60
properties (23)
authoreosint
permlinkre-clayop-easy-docker-guide-for-eos-20170729t094658156z
categoryeoskorea
json_metadata{"tags":["eoskorea"],"app":"steemit/0.1"}
created2017-07-29 09:46:57
last_update2017-07-29 09:46:57
depth1
children2
last_payout2017-08-05 09:46:57
cashout_time1969-12-31 23:59:59
total_payout_value5.426 HBD
curator_payout_value0.175 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length19
author_reputation160,050,284,219
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id10,102,905
net_rshares1,475,317,960,189
author_curate_reward""
vote details (21)
@booster ·
<p>This comment has received a 0.99 % upvote from @booster thanks to: @steembriefing.</p>
properties (22)
authorbooster
permlinkre-eosint-re-clayop-easy-docker-guide-for-eos-20170729t094658156z-20170729t111607600z
categoryeoskorea
json_metadata{"tags":["easy-docker-guide-for-eos"],"app":"drotto/0.0.1"}
created2017-07-29 11:16:27
last_update2017-07-29 11:16:27
depth2
children0
last_payout2017-08-05 11:16:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length90
author_reputation68,767,115,776,562
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id10,108,555
net_rshares0
@randowhale ·
This post received a 4.2% upvote from @randowhale thanks to @steembriefing!  For more information, [click here](https://steemit.com/steemit/@randowhale/introducing-randowhale-will-you-get-the-100-vote-give-it-a-shot)!
properties (22)
authorrandowhale
permlinkre-re-clayop-easy-docker-guide-for-eos-20170729t094658156z-20170729t095224
categoryeoskorea
json_metadata"{"format": "markdown", "app": "randowhale/0.1"}"
created2017-07-29 09:52:24
last_update2017-07-29 09:52:24
depth2
children0
last_payout2017-08-05 09:52:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length217
author_reputation47,657,457,485,459
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id10,103,250
net_rshares0
@lukestokes ·
$2.97
Thank you again for keeping us updated on the latest EOS developments you're working with. I hope to carve off some time this weekend to play around with all of this. :)
👍  , , , , , , , , , ,
properties (23)
authorlukestokes
permlinkre-clayop-easy-docker-guide-for-eos-20170728t043525974z
categoryeoskorea
json_metadata{"tags":["eoskorea"],"app":"steemit/0.1"}
created2017-07-28 04:35:24
last_update2017-07-28 04:35:24
depth1
children0
last_payout2017-08-04 04:35:24
cashout_time1969-12-31 23:59:59
total_payout_value2.234 HBD
curator_payout_value0.738 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length169
author_reputation556,640,380,599,219
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id9,982,097
net_rshares809,638,901,288
author_curate_reward""
vote details (11)
@lukestokes · (edited)
$0.16
Been playing with this today and mentioned this issue in the Telegram as well:

```
CMake Error at /opt/cmake/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find GMP (missing: GMP_LIBRARIES GMP_INCLUDE_DIR)
Call Stack (most recent call first):
  /opt/cmake/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
  libraries/fc/CMakeModules/FindGMP.cmake:50 (find_package_handle_standard_args)
  libraries/fc/CMakeLists.txt:20 (find_package)
```

I was told `sudo apt-get install libgmp3-dev` would do the trick, but it errored again, so now I'm attempting a build with `--no-cache`. I'm building on Google Compute Engine. Having fun so far. I hope I can get it going. :)

**Edit:** Ah, looks like a PR has been submitted and merged with a fix for this: https://github.com/EOSIO/eos/pull/105/files
👍  
properties (23)
authorlukestokes
permlinkre-clayop-easy-docker-guide-for-eos-20170730t023405704z
categoryeoskorea
json_metadata{"tags":["eoskorea"],"app":"steemit/0.1","links":["https://github.com/EOSIO/eos/pull/105/files"]}
created2017-07-30 02:34:06
last_update2017-07-30 04:51:00
depth1
children0
last_payout2017-08-06 02:34:06
cashout_time1969-12-31 23:59:59
total_payout_value0.119 HBD
curator_payout_value0.039 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length870
author_reputation556,640,380,599,219
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id10,178,091
net_rshares41,651,769,849
author_curate_reward""
vote details (1)
@myahya ·
Thank you for the tut.
properties (22)
authormyahya
permlinkre-clayop-easy-docker-guide-for-eos-20170727t230519463z
categoryeoskorea
json_metadata{"tags":["eoskorea"],"app":"steemit/0.1"}
created2017-07-27 23:05:21
last_update2017-07-27 23:05:21
depth1
children0
last_payout2017-08-03 23:05:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length22
author_reputation15,524,419
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id9,960,773
net_rshares0
@randowhale ·
This post received a 2.3% upvote from @randowhale thanks to @cayce!  For more information, [click here](https://steemit.com/steemit/@randowhale/introducing-randowhale-will-you-get-the-100-vote-give-it-a-shot)!
properties (22)
authorrandowhale
permlinkre-easy-docker-guide-for-eos-20170801t084346
categoryeoskorea
json_metadata"{"app": "randowhale/0.1", "format": "markdown"}"
created2017-08-01 08:43:48
last_update2017-08-01 08:43:48
depth1
children0
last_payout2017-08-08 08:43:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length209
author_reputation47,657,457,485,459
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id10,400,557
net_rshares0
@tylerdourden ·
thank you for info
properties (22)
authortylerdourden
permlinkre-clayop-easy-docker-guide-for-eos-20170728t002440597z
categoryeoskorea
json_metadata{"tags":["eoskorea"],"app":"steemit/0.1"}
created2017-07-28 00:24:39
last_update2017-07-28 00:24:39
depth1
children0
last_payout2017-08-04 00:24:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length18
author_reputation623,681,468,859
root_title"Easy Docker Guide for EOS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id9,965,895
net_rshares0