eos icon indicating copy to clipboard operation
eos copied to clipboard

A eosiocpp guide installed by docker is needed!

Open liufuhu opened this issue 8 years ago • 4 comments

I use eosiocpp installed by docker, but can not find the new created contract:

image

the eosiocpp command is generated as follows:

sudo docker run --rm --name eosio -d -p 8888:8888 -p 9876:9876 -v /Users/liufuhu/study/blockchain/eos/example/work:/work -v /Users/liufuhu/study/blockchain/eos/example/data:/mnt/dev/data -v /Users/liufuhu/study/blockchain/eos/example/config:/mnt/dev/config eosio/eos-dev:v1.0.8  /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"
11850  docker container ls --all
alias eosiocpp='docker exec eosio /opt/eosio/bin/eosiocpp'

liufuhu avatar Jul 16 '18 02:07 liufuhu

docker exec execute your command inside the container, so your helloEos folder is located inside your docker container instead of your docker host. Check your docker container and you will see helloEos inside your docker container root folder :)

For more information about the behaviour of docker exec, you can check docker exec reference here https://docs.docker.com/engine/reference/commandline/exec/

andriantolie avatar Jul 16 '18 07:07 andriantolie

thank you, i got it.

liufuhu avatar Jul 17 '18 01:07 liufuhu

@liufuhu i get eosiocpp command not found , i am using docker any help?

vijaytabhatt avatar Jul 19 '18 12:07 vijaytabhatt

@vijaytabhatt if you are using docker, have you set up the alias of your eosiocpp? Assuming your docker container is called eosio, it should be alias eosiocpp='docker exec -it eosio eosiocpp'

If you look at our docker hub, https://hub.docker.com/u/eosio/, only eosio/eos-dev supports eosiocpp, eosio/eos does not.

andriantolie avatar Jul 20 '18 02:07 andriantolie