I can get the basic quickstart working very easily but when I try to add smart contract I get a lot of conflicts.

I have read an article here claiming - https://medium.com/@ekkis/eos-development-on-docker-3f4eb9b680ec (112 claps) -

EOS provides a docker-compose.yml on their github repository, which is great but isn’t specifically for developers i.e. tools like eosiocpp aren’t included in the image.

I used the EOS docs - https://github.com/EOSIO/eos/blob/master/Docker/README.md - and produced these containers -

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                                            NAMES
a65fd706c24c        eosio/eos           "/opt/eosio/bin/keos…"   5 hours ago         Up 5 hours                                                           docker_keosd_1
3c1f3625ab25        eosio/eos           "/opt/eosio/bin/node…"   5 hours ago         Up 5 hours>8888/tcp,>9876/tcp   docker_nodeosd_1

I cannot get eosiocpp to work.

One issue for me is that the docs include docker-compose and then references are not to docker-compose.

I tried this -

alias eosiocpp='docker exec docker_keosd_1 /opt/eosio/bin/eosiocpp'
OCI runtime exec failed: exec failed: container_linux.go:348: starting container process caused "exec: \"/opt/eosio/bin/eosiocpp\": stat /opt/eosio/bin/eosiocpp: no such file or directory": unknown

I tried all kinds of combinations but everything produces some kind of error. I want to use docker because the source code installation took a long time when I tried that.

Can anyone provide to install and run eosio (with a smart contract) using docker?

Some details - I did an exec into the container -

cleos  data-dir  eosio-abigen  eosio-launcher  eosio-s2wasm  eosio-wast2wasm  keosd  nodeos  nodeosd.sh
root@nodeosd:/opt/eosio/bin# cd nodeos
bash: cd: nodeos: Not a directory
root@nodeosd:/opt/eosio/bin# exit
trevor@ubuntu-s-4vcpu-8gb-lon1-01:~/eos/contracts/hello$ docker exec -ti docker_keosd_1 bash
root@keosd:/# ls
bin  boot  config.ini  contracts  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@keosd:/# cd opt
root@keosd:/opt# ls
root@keosd:/opt# cd eosio
root@keosd:/opt/eosio# ls
root@keosd:/opt/eosio# cd bin
root@keosd:/opt/eosio/bin# ls
cleos  data-dir  eosio-abigen  eosio-launcher  eosio-s2wasm  eosio-wast2wasm  keosd  nodeos  nodeosd.sh

I cannot find eosiocpp in the /opt directory. Should it be there?

  • eosiocpp is deprecated and it was removed from the main repo briefly but it was added back very recently before it will be removed completely. perhaps you installed when eosiocpp was removed, but you should look for alternatives such as eosio-cpp binary
    – confused00
    Aug 17 '18 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.