<div dir="ltr"><div>Hello,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 6 Dec 2019 at 10:40, AlphaOmega <<a href="mailto:alpha0mega@disroot.org">alpha0mega@disroot.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Dec 6, 2019 09:53, Amey Abhyankar <<a href="mailto:sco1984@gmail.com" target="_blank">sco1984@gmail.com</a>> wrote:<br type="attribution"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>Not sure if we have any Blockchain enthusiasts or developers in our group.</div><div>I am facing 1 issue.</div><div>Just wonder if anybody facing the same issue.</div><div><br></div><div>Goal: Dockerize bitcoin-core to optimise resource utilisation & to eliminate need to keep open the bitcoin-core GUI in Ubuntu.</div><div><br></div><div>Solution: Dockerize bitcoin-core using = <a href="https://bitcoin.org/bin/bitcoin-core-0.18.1/" target="_blank">https://bitcoin.org/bin/bitcoin-core-0.18.1/</a></div><div><br></div><div>Issue statement: Unable to send RPC aka 'Remote Procedure Call' from base machine to docker instance.</div><div></div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Did you use `--rpc' at the docker command line (while launching docker container)?</div></div></blockquote><div><br></div><div>No.</div><div><br></div><div>Taking example of 'ruimarinho's readme.md =<br><b>Step 1) </b>I started container using command = </div><pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;padding:16px;overflow:auto;line-height:1.45;background-color:rgb(246,248,250);border-radius:3px;word-break:normal;color:rgb(36,41,46)">docker run --rm --name bitcoin-server -it ruimarinho/bitcoin-core \
-printtoconsole \
-regtest=1 \
-rpcallowip=<a href="http://172.17.0.0/16">172.17.0.0/16</a> \ </pre><div><span style="background-color:rgb(246,248,250);color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:13.6px"> -rpcauth=</span><span class="gmail-pl-s" style="font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:13.6px;box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">'</span>foo:7d9ba5ae63c3d4dc30583ff4fe65a67e$9e3634e81c11659e3de036d0bf88f89cd169c1039e6e09607562d54765c649cc<span class="gmail-pl-pds" style="box-sizing:border-box">'</span></span> </div><div><b><br></b></div><div>Are you able to run the bitcoin-core using --rpc flag i.e. </div><div><br></div><div><pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;padding:16px;overflow:auto;line-height:1.45;background-color:rgb(246,248,250);border-radius:3px;word-break:normal;color:rgb(36,41,46)">docker run --rm <b>--rpc</b> --name bitcoin-server -it ruimarinho/bitcoin-core \
-printtoconsole \
-regtest=1 \
-rpcallowip=<a href="http://172.17.0.0/16">172.17.0.0/16</a> \ </pre><div><span style="background-color:rgb(246,248,250);color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:13.6px"> -rpcauth=</span><span class="gmail-pl-s" style="font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:13.6px;box-sizing:border-box;color:rgb(3,47,98)"><span class="gmail-pl-pds" style="box-sizing:border-box">'</span>foo:7d9ba5ae63c3d4dc30583ff4fe65a67e$9e3634e81c11659e3de036d0bf88f89cd169c1039e6e09607562d54765c649cc<span class="gmail-pl-pds" style="box-sizing:border-box">'</span></span></div><br></div><div><b>Step 2) </b>RPC thing =</div><div> <span style="background-color:rgb(246,248,250);color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:13.6px">docker run -it --link bitcoin-server --rm ruimarinho/bitcoin-core \</span></div><pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;padding:16px;overflow:auto;line-height:1.45;background-color:rgb(246,248,250);border-radius:3px;word-break:normal;color:rgb(36,41,46)"> bitcoin-cli \
-rpcconnect=bitcoin-server \
-regtest \
-rpcuser=foo\
-stdinrpcpass \
getbalance</pre><div><br></div><div>It throws error saying server not found.<br></div><div>But if I do docker ps it shows the container in running mode.</div><div>I tried with other combinations but then it says make sure bitcoin dameon is running.</div><div>By doing docker exec -it container bash I ensured that the daemon is running & listening on respective port.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto"></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Software version's used:</div><div><br></div><div>- Ubuntu 18.04.3 LTS as base machine</div><div>- Docker ce 19.03.4 version</div><div>- bitcoin-core 0.18.1 </div><div>-Local laptop [no cloud/no vmware/no firewalls]</div><div><br></div><div>Docker images that I tried:<br><br>1) <a href="https://github.com/ruimarinho/docker-bitcoin-core/" target="_blank">https://github.com/ruimarinho/docker-bitcoin-core/</a></div><div>2) <a href="https://github.com/juanluisbaptiste/docker-bitcoin-wallet" target="_blank">https://github.com/juanluisbaptiste/docker-bitcoin-wallet</a></div><div>3) <a href="https://medium.com/@kay.odenthal_25114/access-bitcoind-instance-inside-docker-container-via-json-rpc-cef25ea32f51" target="_blank">https://medium.com/@kay.odenthal_25114/access-bitcoind-instance-inside-docker-container-via-json-rpc-cef25ea32f51</a></div><div><br></div><div>Blockers:</div><div><br></div><div>- Remote procedure call aka RPC not working from base machine i.e. Ubuntu 18.94.3</div><div>- Unable to telnet bitcoin-core on respective ports from base machine. Able to telnet other docker instance on same machine without any issues.</div><div>- bitcoin-core just runs fine in test mode & in prod mode in docker without any issue</div><div>- I did customisation of bitcoin.conf file to put custom ports & credentials</div><div>- Followed the config changes suggested by bitcoin dev team in release notes = <a href="https://bitcoin.org/en/release/v0.18.0#mining" target="_blank">https://bitcoin.org/en/release/v0.18.0#mining</a></div><div><br></div><div>Regards,</div><div>Amey.</div></div>
</blockquote></div><br></div></div></div>_______________________________________________<br>
plug-mail mailing list<br>
<a href="mailto:plug-mail@plug.org.in" target="_blank">plug-mail@plug.org.in</a><br>
<a href="http://list.plug.org.in/listinfo/plug-mail" rel="noreferrer" target="_blank">http://list.plug.org.in/listinfo/plug-mail</a><br>
</blockquote></div></div>