I am creating a Ruby client to connect to Ethereum node inside a docker container. So far,
I was able to run ethereum-go inside docker container Then I bash into docker container & able to connect my ruby client using ipc file location .ethereum/rinkeby/geth.ipc
But is there a way I can connect to that docker ethereum node from another container? or else from host computer? Because I want to run my Ruby client in another container
Best Answer
I am not familiar with RUBY. I am trying same in GoLang though.
I hope my work can help you get started. I created this
docker-compose.yml
. I run the client bydocker-compose up
.As the volume is shared, you get the
geth.ipc
file created in your MAC also.ALSO you can SH into the docker client by simple command
docker exec -it <container name> sh
Inside shell I can then connect to geth using command
geth attach ipc:/root/.ethereum/rinkeby/geth.ipc
Hope it helps.