ruimarinho / docker-bitcoin-core Goto Github PK
View Code? Open in Web Editor NEWA bitcoin-core docker image
Home Page: https://hub.docker.com/r/ruimarinho/bitcoin-core/
License: MIT License
A bitcoin-core docker image
Home Page: https://hub.docker.com/r/ruimarinho/bitcoin-core/
License: MIT License
Is it possible to use docker compose to update image and not have to create a new volume and sync all over again?
docker build -t btc .
Step 8/14 : RUN set -ex && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi && for key in 01EA5486DE18A882D4C2684590C8019E36C2E964 ; do gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; done && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc && gpg --verify SHA256SUMS.asc && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - && tar -xzf *.tar.gz -C /opt && rm *.tar.gz *.asc && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt
---> Running in 1d96a387a388
+ [ = linux/amd64 ]
+ [ = linux/arm64 ]
+ [ = linux/arm/v7 ]
+ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 01EA5486DE18A882D4C2684590C8019E36C2E964
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 90C8019E36C2E964: public key "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
+ curl -SLO https://bitcoin.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 162 100 162 0 0 658 0 --:--:-- --:--:-- --:--:-- 658
+ curl -SLO https://bitcoin.org/bin/bitcoin-core-0.20.0/SHA256SUMS.asc
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1769 100 1769 0 0 7932 0 --:--:-- --:--:-- --:--:-- 7932
+ gpg --verify SHA256SUMS.asc
gpg: Signature made Wed Jun 3 09:59:52 2020 UTC
gpg: using RSA key 90C8019E36C2E964
gpg: Good signature from "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 01EA 5486 DE18 A882 D4C2 6845 90C8 019E 36C2 E964
+ grep bitcoin-0.20.0-.tar.gz$ SHA256SUMS.asc
+ sha256sum -c -
sha256sum: 'standard input': no properly formatted SHA256 checksum lines found
The command '/bin/sh -c set -ex && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi && for key in 01EA5486DE18A882D4C2684590C8019E36C2E964 ; do gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; done && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc && gpg --verify SHA256SUMS.asc && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz\$" SHA256SUMS.asc | sha256sum -c - && tar -xzf *.tar.gz -C /opt && rm *.tar.gz *.asc && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt' returned a non-zero code: 1
Hello,
I am trying to extract 'bitcoin-0.18.1.tar.gz' file at following path = /test/data1/abc dir
I am using 0.18 repo.
I have created this directory structure under 0.18 repo on my Ubuntu 18.04 laptop.
I get error saying file or directory not found.
My goal is to extract the tar file on persistent drive. (/test/data1/abc dir)
Since the 2013 change in Bitcoin-Core, the node has been changed to run on LevelDB over BerkeleyDB. Is there a particular reason, development-related or not, that this repo uses BerkeleyDB in its Alpine image?
Is it due to Alpine image limitation?
Hi, how is the way to add node?
Hello,
I want to copy bitcoin.conf on external volume i.e. /DataDrive/CoinData/Bitcoin directory.
How to do that?
/DataDrive/CoinData/Bitcoin is a directory structure on my base machine.
My docker-compose.yml file =
bitcoind:
image: btc-docker/bitcoin-core
command:
-printtoconsole
-regtest=1
volumes:
- .DataDrive/CoinData/Bitcoin/bitcoin.conf:/DataDrive/CoinData/Bitcoin
- .DataDrive/CoinClients/Bitcoin:/DataDrive/CoinClients/Bitcoin
in your docs you hint at being able to start this image from docker-compose. I'm doing that but have a problem: how do I tell the docker-compose.yml
what IP addresses to allow connections from?
docker-compose creates a network when bringing up the services and I'm happy to allow any container in that network to query bitcoind, so I could use a mask (I don't have to know the specific IP address in question)
but what is the address?
- Edit I -
to clarify, your docs already to indicate -rpcallow=172.17.0.0/16
, which will work when starting the container on the bridge network, but docker-compose creates a network of its own and assigns it a different address (in my test case, it comes in as 172.18.x)
There are release candidate binary releases of Bitcoin Core v24.0 available now and a Testing Guide: Bitcoin Core 24.0 Release Candidate document.
I would be great to be able to do testing using this Docker container. Is anyone else interested in getting a start on a v24.0 RC version of this container? If I put together a PR is there interested in reviewing and/or merging it?
There are new binaries which have the crash/inflation fix. We should update as fast as possible.
Hey guys, truly amazing work!
Two questions however: have you considered also building and uploading arm[64] images (alpine images would be great to have available on Raspberry Pi-class computers).
Additionally, it would be very handy to have a version of the image built w/o the wallet - useful for nodes that only function as the source of truth, ex a backend for Lightning Network node.
it looks like both v 0.17 and 0.18 are marked latest, does that mean first timers should use v0.16? ty
latest update of image ruimarinho/bitcoin-core:0.18-alpine and:
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: event_base_once: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: bufferevent_get_output: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: evhttp_request_get_command: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: bufferevent_disable: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: _ZN5boost10filesystem6detail18create_directoriesERKNS0_4pathEPNS_6system10error_codeE: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: evhttp_send_error: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: evhttp_request_get_output_buffer: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: _ZN5boost10filesystem6detail10equivalentERKNS0_4pathES4_PNS_6system10error_codeE: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: _ZN5boost6chrono12system_clock3nowEv: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: _ZN5boost6system16generic_categoryEv: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: _ZTIN5boost6detail16thread_data_baseE: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: _ZTIN5boost6detail16thread_data_baseE: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: _ZTIN5boost6detail16thread_data_baseE: symbol not found
Error relocating /opt/bitcoin-0.18.1/bin/bitcoind: _ZTVN5boost6detail16thread_data_baseE: symbol not found
Why not test before push image to hub?
22.0-alpine is duplicated in the README and I couldn't pull 22-alpine image like I would have expected.
Update bitcoin-core to the latest version.
Did you stop updating?
There's a new maintenance relase of Bitcoin Core out. Would be great to get it on Docker Hub.
In starting up a Docker container with:
docker run --name bitcoin \
-p 8332:8332 \
-p 8333:8333 \
ruimarinho/bitcoin-core:0.15.0.1 \
-printtoconsole \
-rpcpassword=foo \
-rpcuser=bar
And then attempting to query it with docker exec bitcoin bitcoin-cli getmininginfo
, I get an error message of:
error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/root/.bitcoin/bitcoin.conf)
That error seems to imply that it's looking for a bitcoin.conf
file in /root/.bitcoin/
, but the data directory is at /home/bitcoin/.bitcoin/
.
How can I get this Docker container to properly start up and enable local RPC calls to be made?
The Debian version 0.21 of the Dockerfile doesn't build. The Alpine version works fine however.
$ docker build .
Sending build context to Docker daemon 11.78kB
Step 1/14 : FROM debian:bullseye-slim
---> ea64efa816a4
Step 2/14 : LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" maintainer.1="Pedro Branco (@pedrobranco)" maintainer.2="Rui Marinho (@ruimarinho)"
---> Using cache
---> 15a8ce17693e
Step 3/14 : RUN useradd -r bitcoin && apt-get update -y && apt-get install -y curl gnupg gosu && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
---> Using cache
---> f61f20f6723a
Step 4/14 : ARG TARGETPLATFORM
---> Using cache
---> 0bf4c77a1c41
Step 5/14 : ENV BITCOIN_VERSION=0.21.0
---> Using cache
---> 0b54f3af2755
Step 6/14 : ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
---> Using cache
---> 25ea885588f4
Step 7/14 : ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
---> Using cache
---> 3fa7becd1624
Step 8/14 : RUN set -ex && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi && for key in 01EA5486DE18A882D4C2684590C8019E36C2E964 ; do gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; done && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc && gpg --verify SHA256SUMS.asc && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz" SHA256SUMS.asc | sha256sum -c - && tar -xzf *.tar.gz -C /opt && rm *.tar.gz *.asc && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt
---> Running in 334bd0f86a60
+ [ = linux/amd64 ]
+ [ = linux/arm64 ]
+ [ = linux/arm/v7 ]
+ gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 01EA5486DE18A882D4C2684590C8019E36C2E964
gpg: directory '/root/.gnupg' created
gpg: keybox '/root/.gnupg/pubring.kbx' created
gpg: /root/.gnupg/trustdb.gpg: trustdb created
gpg: key 90C8019E36C2E964: public key "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
+ curl -SLO https://bitcoin.org/bin/bitcoin-core-0.21.0/bitcoin-0.21.0-.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 162 100 162 0 0 156 0 0:00:01 0:00:01 --:--:-- 156
+ curl -SLO https://bitcoin.org/bin/bitcoin-core-0.21.0/SHA256SUMS.asc
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1769 100 1769 0 0 1989 0 --:--:-- --:--:-- --:--:-- 1987
+ gpg --verify SHA256SUMS.asc
gpg: Signature made Thu Jan 14 12:35:31 2021 UTC
gpg: using RSA key 90C8019E36C2E964
gpg: Good signature from "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 01EA 5486 DE18 A882 D4C2 6845 90C8 019E 36C2 E964
+ grep bitcoin-0.21.0-.tar.gz SHA256SUMS.asc
+ sha256sum -c -
sha256sum: 'standard input': no properly formatted SHA256 checksum lines found
The command '/bin/sh -c set -ex && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi && if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi && for key in 01EA5486DE18A882D4C2684590C8019E36C2E964 ; do gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; done && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz && curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc && gpg --verify SHA256SUMS.asc && grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz" SHA256SUMS.asc | sha256sum -c - && tar -xzf *.tar.gz -C /opt && rm *.tar.gz *.asc && rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt' returned a non-zero code: 1
As the title says - when the data folder is mounted on the host, the files are created with an unknown UID from the host perspective. Would be nice if we could specify what user ID it maps to.
My preference would be to follow the common format as used by linuxserver.io images (PUID & PGID), but anything will do, as long as we can specify it :)
In my docker-compose file i try to use :
image: ruimarinho/bitcoin-core:0.18.1
and i get this error : ERROR: manifest for ruimarinho/bitcoin-core:0.18.1 not found: manifest unknown: manifest unknown
It works if i do image: ruimarinho/bitcoin-core:0.16.3
for example
services:
bitcoind:
container_name: bitcoind
image: ruimarinho/bitcoin-core:latest
command:
-signet=1
-server=1
I keep getting the following error,
Binding RPC on address ::1 port 38332 failed.
I would really appreciate some help for how to get the RPC port to work since I am trying to connect a lightning node to it. I was thinking once I learn how to do this I could add it to the readme.
I'm trying to run bitcoind exposing the ports as explained in the README here, but when I do the curl I'm getting 401:
docker run --rm -it -p 18443:18443 -p 18444:18444 ruimarinho/bitcoin-core -printtoconsole -regtest=1 -rpcallowip=172.17.0.0/16 -rpcbind=0.0.0.0 '-rpcauth=foo:7d9ba5ae63c3d4dc30583ff4fe65a67e$9e3634e81c11659e3de036d0bf88f89cd169c1039e6e09607562d54765c649cc'
...
curl -v --data-binary '{"jsonrpc":"1.0","id":"1","method":"getnetworkinfo","params":[]}' http://foo:[email protected]:18443
* Trying 127.0.0.1:18443...
* Connected to 127.0.0.1 (127.0.0.1) port 18443 (#0)
* Server auth using Basic with user 'foo'
> POST / HTTP/1.1
> Host: 127.0.0.1:18443
> Authorization: Basic Zm9vOnFERFpkZVE1dnc5WFhGZVZuWFQ0UFotLXRHTjJ4TmpqUjRucnR5c3paeDA9
> User-Agent: curl/7.79.1
> Accept: */*
> Content-Length: 64
> Content-Type: application/x-www-form-urlencoded
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 401 Unauthorized
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="jsonrpc"
< Date: Wed, 29 Jun 2022 15:09:38 GMT
< Content-Length: 0
< Content-Type: text/html; charset=ISO-8859-1
<
* Connection #0 to host 127.0.0.1 left intact
Any idea what could be wrong? Does the README need updating?
Unfortunately, the version on dockerhub does not have the latest changes (the exposed port). Could you release a new version so that the change is available?
Binding RPC on address ::1 port 18332 failed.
2019-09-10T02:24:04Z Bound to [::]:18333
2019-09-10T02:24:04Z Bound to 0.0.0.0:18333
docker run -d --name bitcoin-server -p 18332:18332 -p 18333:18333 \
-e TZ=Asia/Shanghai \
-v /usr/share/zoneinfo/Asia/Shanghai:/usr/share/zoneinfo/Asia/Shanghai:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone \
-v /home/data/btc/data:/home/bitcoin/.bitcoin \
ruimarinho/bitcoin-core:0.16.2 \
-printtoconsole -testnet \
-rpcauth='admin:bf5ff4cd8cb1a885c35f68fde11e122$8bd560b76fe6d663854351da53f5e290bc50cf8ad262501dde8b9ee210f4ca0a'
but the date printed by the console is still UTC
plase help me,tks
Since the entrypoint executes chmod 700 on the data directory, it is not possible to the host accessing to the data folder unless you use the root account or changing the permissions manually (it works until the next restart).
I changed 700 by 755 on the entrypoint and work for me.
Hello,
When I execute the docker run to get balance, I am getting following error =
`docker run -it --rm btc-18nov \ bitcoin-cli \ -rpcconnect=bitcoin-server -rpcuser=amey\ -regtest=1 \ -stdinrpcpass \ getbalance
/entrypoint.sh: 4: [: =: unexpected operator
/entrypoint.sh: 10: [: =: unexpected operator
/entrypoint.sh: 26: exec: bitcoin-cli: not found
`
Pls suggest how to fix this issue thanks.
Hi,
I just tried to use the Dockerfile for 0.2.0 for Alpine.
Everything seems to go Ok until RUN make -j4 is run, it returns the following error:
Step 47/69 : RUN make -j4 ---> Running in d234fab5d656 Making all in src make[1]: Entering directory '/bitcoin-0.20.1/src' make[2]: Entering directory '/bitcoin-0.20.1/src' CXX bitcoind-bitcoind.o CXX libbitcoin_server_a-addrdb.o CXX libbitcoin_server_a-addrman.o CXX libbitcoin_server_a-banman.o CXX libbitcoin_server_a-blockencodings.o CXX libbitcoin_server_a-blockfilter.o CXX libbitcoin_server_a-chain.o CXX libbitcoin_server_a-flatfile.o CXX libbitcoin_server_a-httprpc.o CXX libbitcoin_server_a-httpserver.o CXX libbitcoin_server_a-init.o CXX libbitcoin_server_a-dbwrapper.o CXX libbitcoin_server_a-miner.o CXX libbitcoin_server_a-net.o CXX libbitcoin_server_a-net_processing.o g++: fatal error: Killed signal terminated program cc1plus compilation terminated. make[2]: *** [Makefile:10646: libbitcoin_server_a-init.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/bitcoin-0.20.1/src' make[1]: *** [Makefile:17263: all-recursive] Error 1 make[1]: Leaving directory '/bitcoin-0.20.1/src' make: *** [Makefile:781: all-recursive] Error 1 ERROR: Service 'bitcoin' failed to build : The command '/bin/sh -c make -j4' returned a non-zero code: 2
Does this problem sounds familiar?
https://github.com/bitcoin/bitcoin/releases/tag/v0.15.1
https://bitcoin.org/bin/bitcoin-core-0.15.1/
PS: thanks for the awasome containers! :)
Hi.
I have created the container with:
docker run --name testnetnode -d \
-p 18332:18332 \
-p 18333:18333 \
ruimarinho/bitcoin-core \
-testnet=1 \
-debug=1 \
-server=1 \
-rpcbind=127.0.0.1 \
-rpcallowip=127.0.0.1 \
-rest=1 \
-txindex=1 \
-zmqpubhashblock=tcp://127.0.0.1:18110 \
-zmqpubrawtx=tcp://127.0.0.1:18111 \
-zmqpubrawblock=tcp://127.0.0.1:18112 \
-datadir=/media/r2d2/ssd_2/.bitcoin/testnet \
-rpcauth='testnet:xxxx'
I can connect with docker successfully:
docker exec testnetnode bitcoin-cli -testnet -rpcport=18332 -rpcuser=testnet --rpcpassword=xxx getblockchaininfo
But bitcoin-cli doesn't work:
bitcoin-cli -rpcuser=testnet -rpcport=18332 -rpcpassword=xxx getblockchaininfo
Gives error:
error: Could not connect to the server 127.0.0.1:18332
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
From my rpc client I get also get an error:
Error: socket hang up
Another thing I don't understand is that docker ps
shows that the contrainer is reserving ports 8332-8333 which are mainnet's and port 18443:18444 which are regtest's.
1440c49ed036 ruimarinho/bitcoin-core "/entrypoint.sh -tes…" 28 minutes ago Up 28 minutes 8332-8333/tcp, 18443-18444/tcp, 0.0.0.0:18332-18333->18332-18333/tcp testnetnode
I'm wondering if there's any concern about relying on gpg from the same source as where the tarball has been downloaded.
The SHA256SUMS downloads from https://bitcoin.org/bin..
and then the .tar.gz
downloads from the same source. If the GPG is used to verify there was no man in the middle attack or some other subterfuge, should the sha256 sum be supplied from a different location?
I'm trying to run bitcoind from the docker image like this:
docker run --rm -it --name bitcoind -p 8332 -v ${PWD}/bitcoind:/home/bitcoin/.bitcoin seegno/bitcoind:latest -server -printtoconsole
but I'm getting the error below:
/entrypoint.sh: assuming arguments for bitcoin
/entrypoint.sh: setting data directory to /home/bitcoin/.bitcoin2016-07-03 05:57:12
[many empty lines]
2016-07-03 05:57:12 Bitcoin version v0.12.0 (2016-02-17 09:40:03 +0100)
2016-07-03 05:57:12 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2016-07-03 05:57:12 Error: Cannot obtain a lock on data directory /home/bitcoin/.bitcoin. Bitcoin Core is probably already running. No such file or directory.
Error: Cannot obtain a lock on data directory /home/bitcoin/.bitcoin. Bitcoin Core is probably already running. No such file or directory.
2016-07-03 05:57:12 Shutdown: In progress...
2016-07-03 05:57:12 StopNode()
2016-07-03 05:57:12 Shutdown: done
the directory I've created to host the blockchain (and presumably the wallet) looks like this:
drwxr-xr-x 2 ekkis staff 68 Jul 2 22:46 bitcoind/
so what am I doing wrong? the container doesn't have sufficient space in it for a sync so I need to write it to my local disk.
incidentally I'm running this on OSX using Boot2Docker, which I understand maps my /home
folder automatically to the the docker-machine's file system. I've also verified that there is no bitcoind/.lock
file.
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/entrypoint.sh": permission denied: unknown
After:
COPY docker-entrypoint.sh /entrypoint.sh
Add:
RUN chmod +x entrypoint.sh
First of all, thank you very much for your work. I am running into an issue that it maybe silly as I am new to docker but I cannot connect to the RPC from my application.
When I do from console, all is smooth:
$ docker exec bitcoincore_1 bitcoin-cli -regtest -rpcuser=rpcuser -rpcpassword=rpcpassword getmininginfo
{
"blocks": 0,
"currentblockweight": 0,
"currentblocktx": 0,
"difficulty": 4.656542373906925e-10,
"errors": "",
"networkhashps": 0,
"pooledtx": 0,
"chain": "regtest"
}
But when I try to connect from my app using an RPC client, it fails:
Message: cURL error 7: Failed to connect to bitcoincore port 8332: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
This is how I configured the services:
services:
bitcoincore:
image: ruimarinho/bitcoin-core:latest
restart: always
command:
-printtoconsole
-regtest=1
-rpcuser=rpcuser
-rpcpassword=rpcpassword
ports:
- "8332:8332"
php:
build: .
ports:
- "80:80"
depends_on:
- bitcoincore
- mysqldb
links:
- bitcoincore:bitcoincore
- mysqldb:mysqldb
volumes:
....
Any help would be highly appreciated. And apologies if its a lame question. Thanks in advance.
https://bitcoin.org/ seems slow to update. I can try to provide a PR if @ruimarinho agrees with such switch.
In some environments like Synology docker is already integrated using good UI.
It might be easier for end user to specify RPCAUTH variable instead of dealing with command line.
Is there any chance we can have 24.1 and 25.0 pushed to dockerhub please?
Docker hub still shows 0.20.0
in the README as a tag. Although I assume it is 0.20.1
now or just 0.20
.
https://hub.docker.com/r/ruimarinho/bitcoin-core
I also couldn't search for 0.20.1
tag on docker hub.
I didn't see the latest version on Docker Hub.
Hello,
Firstly I would like to thank you for work you have done.
Out of the box, this container works!
I am trying to run your container through my tor container with following execution (I am using podman)
$ podman run --rm --interactive --tty \
--name=bitcoind-node \
--volume bitcoin-data:/home/bitcoin/.bitcoin \
--network container:tor-socks-proxy_btc \
ruimarinho/bitcoin-core
I have created a volume /var/lib/containers/storage/volumes/bitcoin-data
However, when I start bitcoin container, I see a few things that make me think that it is not seeing bitcoin-data volume.
...
Default data directory /home/bitcoin/.bitcoin
Using data directory /home/bitcoin/.bitcoin
Config file: /home/bitcoin/.bitcoin/bitcoin.conf (not found, skipping)
Command-line arg: datadir="/home/bitcoin/.bitcoin"
...
UpdateTip: new best=00000000340a301c84fee7800ca694ca64e9fc8124334bf51[1938/1938]
9131 height=15011 version=0x00000001 log2_work=45.873851 tx=15136 date='2009-05-19T06:44:23Z' progres
s=0.000022 cache=3.3MiB(15117txo)
UpdateTip: new best=000000009023a0ae404b63221692f4695bb6b2883bedb1a2df44ee9b0015
f15e height=15012 version=0x00000001 log2_work=45.873947 tx=15137 date='2009-05-19T06:52:59Z' progres
s=0.000022 cache=3.3MiB(15118txo)
UpdateTip: new best=000000000f4574808d8c3b5fcfc6bb49cd2c3e9e4d5d213d7e6a47b7186c
6108 height=15013 version=0x00000001 log2_work=45.874043 tx=15138 date='2009-05-19T07:04:50Z' progres
s=0.000022 cache=3.3MiB(15119txo)
... etc
In bitcoin-data volume, I have conf and all blocks up to today from my main node, so it 'should' use my bitcoin.conf
and not start a full blockchain sync from 2009.
$ ls bitcoin-data
banlist.dat bitcoind.pid _data fee_estimates.dat mempool.dat peers.xxx settings.json
bitcoin.conf blocks database indexes old peers.dat wallet.dat
bitcoin.conf_old chainstate debug.log lightning peers.xxx rpcauth.py wallet.datBU
What am I doing wrong?
Thanks in advance.
Hi,
First, thank you for your work. :)
It seems you updated the 0.21
tag some days ago since this update, my node using the docker 0.21
is unable to restart.
I'm getting this error in the logs (this is the entire logs):
Error: Failed saving settings file:
- Error: Unable to open settings file /data/settings.json.tmp for writing
I'm not sure what this error is about:
If you have an idea ? Thank you in advance.
The following versions and tags will be deprecated on GitHub and Docker Hub due to CVE-2018-17144:
I am trying to use the ruimarinho/bitcoin-core:23.0-alpine
alongwith a lightningd
image in docker compose. but it seems it the bitcoin image has no HEALTHCHECK option which can be used to prevent starting lightningd
before bitcoind
is all setup.
Changing permissions on exfat drives is not allowed. The entrypoint script fails.
bitcoin | chown: changing ownership of '/home/bitcoin/.bitcoin': Operation not permitted
Why exactly are those two lines needed?
https://github.com/ruimarinho/docker-bitcoin-core/blob/master/23/docker-entrypoint.sh#L12-L13
We should create an image for Bitcoind 0.15.
Title says it all, it would be nice to have the latest version available.
How to use prune option when using this image so that I don't have to allocate a full 400GB hdd space and run a real full node, any info is really appreciated, thx
I managed to create a docker-compose.yml file here is the contents below
version: '3.9'
services:
bitcoind:
image: ruimarinho/bitcoin-core:22.0
container_name: bitcoind
volumes:
- ./bitcoin.conf:/home/bitcoin/.bitcoin/bitcoin.conf
- ./data:/home/bitcoin/.bitcoin
environment:
- printtoconsole=1
- prune=550
- rpcallowip=172.20.0.0/16
- rpcauth="foo:8a3sdfw32323wefsdf0e02b14fb62e3117384023da030c0$e6dadfsdfsdf2werfrf"
ports:
- "8332:8332"
- "8333:8333"
- "38332:38332"
- "38333:38333"
- "18332:18332"
- "18333:18333"
- "18444:18444"
- "18443:18443"
networks:
default:
external: true
name: nginx-proxy-network
The bitcoind container is up and running but the prune doesn't seem to work, my hdd space is crossing over 20GB after few minutes, what's the solution to use pruned container ? Thanks any insight is much appreciated.
0.21.0 has been released. It would be nice to have this option in these docker images.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.