from web3 import Web3
web3 = Web3(Web3.IPCProvider("/Ethereum/geth.ipc"))
print(f'IPC connected: {web3.isConnected()}') # want to return True
I have the above script Dockerized and I'm trying to connect to geth.ipc
on local host and I can't seem to connect to it.
Here is how I run Docker:
docker run --mount type=bind,source=$HOME/Library/Ethereum,target=/Ethereum container1
I've verified that geth.ipc
exists in /Ethereum
directory but cannot seem to connect to it. Is there a way to do it?
The question might be related to this and here is my original question https://stackoverflow.com/questions/52715141/how-to-make-a-docker-container-talk-to-geth-on-local-host