I am trying to run a node inside a docker container.
I am able to run a geth node locally, and attach it via IPC with these simple commands:
geth --fast --cache=512
Then
geth attach
, it works fine.
Then I run a docker container (ethereum/client-go
) with the same parameter, volume mounted on same ethereum folder.
Docker command:
docker run -d --name ethereum-node -v /Users/****/Library/Ethereum:/root/.ethereum -p 8545:8545 -p 30303:30303 ethereum/client-go --fast --cache=512
The geth.ipc file is present, but I cannot attach.
$ geth attach
Fatal: Unable to attach to remote geth: dial unix /Users/****/Library/Ethereum/geth.ipc: connect: connection refused
I tried to read/write geth.ipc:
- When geth is run locally:
$ cat geth.ipc {"jsonrpc":"2.0","error":{"code":-32600,"message":"EOF"}}
- When under container :
$ cat geth.ipc cat: geth.ipc: Connection refused
Running OSX 10.12.1, docker 1.12.3