docker run -d --name ipfs-node
-v /tmp/ipfs-docker-staging:/export -v /tmp/ipfs-docker-data:/data/ipfs
and the python container like :
docker run -d --name my-own-container --net=my-network -p 8070:8070 my-own-container
Port 8070 is used for dash as a web UI. When I start my-own-container, I get the error :
ipfshttpclient.exceptions.ConnectionError: ConnectionError: HTTPConnectionPool(host=‘0.0.0.0’, port=5001): Max retries exceeded with url: /api/v0/version?stream-channels=true (Caused by NewConnectionError(’<ipfshttpclient.requests_wrapper.HTTPConnection object at 0x7ff644802eb8>: Failed to establish a new connection: [Errno 111] Connection refused’))
which resemble the error I get when starting the python script on its own without the ipfs daemon running.
The specific line where the error is caused is this one:
client = ipfshttpclient.connect(’/ip4/127.0.0.1/tcp/5001/http’)
I have tried to replace 127.0.0.1 with 0.0.0.0 and the container name without success.
Thus, I think this is caused by the fact that the python container cannot see the daemon from ipfs-node. I verified it was up and running by doing :
docker exec -it ipfs-node sh
Any idea what I could do wrong?