Ninjastic
Home
Search
Users
Boards
Addresses
Ctrl + K
Toggle theme
Open menu
Post
Edited versions
Quotes to this post
Post
61118751
Topic
5417077
Board
Development & Technical Discussion
Re: How to connect docker container to bitcoin node?
by
vv181
on
14/10/2022, 11:21:58 UTC
You should use the internal IP on the Python container, not localhost.
Code:
connection_url="http://%s:%s@host.docker.internal:8332/wallet/testwallet"
credentials=('testuser','testpassword')
rpc_connection = AuthServiceProxy(connection_url % credentials)
rpc_connection.getnewaddress()
If it still not works, try to refer to
https://www.howtogeek.com/devops/how-to-connect-to-localhost-within-a-docker-container/