Skip to content

Commit 7a98495

Browse files
authored
V2026.4 (#22)
Upgrade project
1 parent a58d53d commit 7a98495

14 files changed

Lines changed: 131 additions & 130 deletions

File tree

.env.example

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SHARED_GID=1099
55
# Tor expert bundle version and platform to build the container.
66
# To be obtained from this site: https://gitweb.torproject.org/tor.git
77
# Example: tor-0.4.8.10
8-
TOR_VERSION=0.4.8.13
8+
TOR_VERSION=0.4.9.6
99

1010
# User identifier used for tor inside the container.
1111
TOR_USER_ID=1099
@@ -16,7 +16,7 @@ TOR_DATA=./volumes/tor
1616
# i2p version to build the container.
1717
# To be obtained from this site: https://github.com/i2p/i2p.i2p/releases
1818
# Example: i2p-2.7.0
19-
I2P_VERSION=2.7.0
19+
I2P_VERSION=2.11.0
2020

2121
# User identifier used for i2p inside the container.
2222
I2P_USER_ID=1000
@@ -27,19 +27,19 @@ I2P_DATA=./volumes/i2p
2727
# Bitcoin core version to build the container.
2828
# To be obtained from this site: https://github.com/bitcoin/bitcoin/releases
2929
# Example: bitcoin-v26.0
30-
BITCOIN_VERSION=28.1
30+
BITCOIN_VERSION=30.2
3131

3232
# Directory on the local machine where to mount the data volume for bitcoin
3333
# core (where the blockchain, indexes and configuration will be stored)
34-
BITCOIN_DATA=./volumes/bitcoind
34+
BITCOIN_DATA=./volumes/bitcoin
3535

3636
# User identifier used for bitcoin inside the container
3737
BITCOIN_USER_ID=1099
3838

3939
# Electrs version to build the container.
4040
# To be obtained from this site: https://github.com/romanz/electrs/releases
4141
# Example: v0.10.1
42-
ELECTRS_VERSION=0.10.8
42+
ELECTRS_VERSION=0.11.1
4343

4444
# Port on the local machine where to bind Electrs
4545
ELECTRS_SSL_PORT=50002
@@ -53,7 +53,7 @@ ELECTRS_USER_ID=1099
5353
# BTC Explorer to build the container.
5454
# To be obtained from this site: https://github.com/janoside/btc-rpc-explorer/releases
5555
# Example: v3.3.0.tar.gz (3.3.0)
56-
BTC_RPC_EXPLORER_VERSION=3.4.0
56+
BTC_RPC_EXPLORER_VERSION=3.5.1
5757

5858
# Port on the local machine where to bind btc explorer
5959
BTC_RPC_EXPLORER_HTTPS_PORT=3003

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
name: daily build
1+
name: weekly build
22
on:
33
workflow_dispatch:
44
schedule:
5-
- cron: 0 0 * * *
5+
- cron: 0 0 * * 1
66
jobs:
77
build:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout repository
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212
- name: Build default images
1313
run: docker compose --env-file .env.example build
1414
- name: Build disabled images

GETTING_STARTED.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- <a href="#setup-the-multi-container-applications">Setup the multi-container applications</a>
66
- <a href="#running-services-for-the-first-time">Running services for the first time</a>
77
- <a href="#tor">tor</a>
8-
- <a href="#bitcoind">bitcoind</a>
8+
- <a href="#bitcoin">bitcoin</a>
99
- <a href="#electrs">electrs</a>
1010
- <a href="#btcrpcexplorer">btcrpcexplorer</a>
1111
- <a href="#nginx">nginx</a>
@@ -84,7 +84,7 @@ SHARED_GID=1099
8484
8585
# The paths where to mount the volumes.
8686
TOR_DATA=/mnt/hdd/tor
87-
BITCOIN_DATA=/mnt/hdd/bitcoind
87+
BITCOIN_DATA=/mnt/hdd/bitcoin
8888
ELECTRS_DATA=/mnt/hdd/electrs
8989
BTC_RPC_EXPLORER_DATA=/mnt/hdd/btcrpcexplorer
9090
NGINX_DATA=/mnt/hdd/nginx
@@ -96,7 +96,7 @@ Optionally, the user id of each service can be adjusted to match the user id of
9696

9797
For the first installation, we recommend starting the services one at a time. Take your time to verify by yourself the `Dockerfiles` and validate that the services are being deployed correctly.
9898

99-
It is also important because bitcoind will take a long time to synchronize, and if in the meantime, the rest of the containers that depend on it are continuously failing because the service is not available, these are resources that will make the process take even longer.
99+
It is also important because bitcoin will take a long time to synchronize, and if in the meantime, the rest of the containers that depend on it are continuously failing because the service is not available, these are resources that will make the process take even longer.
100100

101101
### tor
102102

@@ -125,11 +125,11 @@ $ docker logs -f 06a96296854a
125125

126126

127127

128-
### bitcoind
128+
### bitcoin
129129

130-
The bitcoind configuration file is located in `/mnt/hdd/bitcoind/bitcoin.conf`. The default parameters are enough, except for one that depends on the memory of your local machine and the default password for communication between services, which you should generate yourself for security reasons.
130+
The bitcoin configuration file is located in `/mnt/hdd/bitcoin/bitcoin.conf`. The default parameters are enough, except for one that depends on the memory of your local machine and the default password for communication between services, which you should generate yourself for security reasons.
131131

132-
The more cache bitcoind has, the faster it will be downloading and synchronizing the blocks. As a reference, you can set half of the machine memory expressed in MB. For example, if the node has 4GB of RAM, you can put 2048.
132+
The more cache bitcoin has, the faster it will be downloading and synchronizing the blocks. As a reference, you can set half of the machine memory expressed in MB. For example, if the node has 4GB of RAM, you can put 2048.
133133

134134
```conf
135135
dbcache=2048
@@ -157,14 +157,14 @@ Replace the two strings in the configuration file and take note of the passwords
157157

158158
This is the longest process and until it is finished we cannot continue. Your node will start synchronizing the entire blockchain with the rest of peers. This process can take days or even weeks. It's very difficult to give an estimation, because it depends on the capacity of your hardware, the state of the network, your connection speed... So be patient.
159159

160-
Run the following command `docker compose up -d bitcoind` to start the service and check the logs to be sure that the services is running properly.
160+
Run the following command `docker compose up -d bitcoin` to start the service and check the logs to be sure that the services is running properly.
161161

162-
For this example, after a certain time, bitcoind was already synchronizing the 769944 block height (`height=769944`) and almost all the blockchain was already synchronized (`progress=0.999838`). At the time of writing this document, this was the last block mined, so the node was synchronized and we can move the next step.
162+
For this example, after a certain time, bitcoin was already synchronizing the 769944 block height (`height=769944`) and almost all the blockchain was already synchronized (`progress=0.999838`). At the time of writing this document, this was the last block mined, so the node was synchronized and we can move the next step.
163163

164164
```shell
165-
$ docker compose up bitcoind -d
166-
$ docker ps | grep bitcoind
167-
# 7cc89e57effb bitcoind:24.0.1
165+
$ docker compose up bitcoin -d
166+
$ docker ps | grep bitcoin
167+
# 7cc89e57effb bitcoin:30.2
168168
$ docker logs -f 7cc89e57effb
169169
# You should see it synchronizing blocks as follows:
170170
#
@@ -182,11 +182,11 @@ $ docker logs -f 7cc89e57effb
182182

183183
### electrs
184184

185-
The electrs configuration file is located in `/mnt/hdd/electrs/electrs.conf`. The default parameters are enough, except for the password which must be replaced by the one generated earlier when configuring bitcoind.
185+
The electrs configuration file is located in `/mnt/hdd/electrs/electrs.conf`. The default parameters are enough, except for the password which must be replaced by the one generated earlier when configuring bitcoin.
186186

187187
Run the following command `docker compose up -d electrs` to start the service and check the logs to be sure that the service is running properly.
188188

189-
For this example, we can see that electrs has already indexed the entire blockchain (`height=769944`, same block height as bitcoind).
189+
For this example, we can see that electrs has already indexed the entire blockchain (`height=769944`, same block height as bitcoin).
190190

191191
```shell
192192
$ docker ps | grep electrs
@@ -200,11 +200,11 @@ $ docker logs -f 92ebe51900c9
200200

201201
### btcrpcexplorer
202202

203-
The btc-rpc-explorer configuration file is located in `/mnt/hdd/btcrpcexplorer/btc-rpc-explorer.env`. The default parameters are also enough, except for the password which must be replaced by the one generated earlier when configuring bitcoind.
203+
The btc-rpc-explorer configuration file is located in `/mnt/hdd/btcrpcexplorer/btc-rpc-explorer.env`. The default parameters are also enough, except for the password which must be replaced by the one generated earlier when configuring bitcoin.
204204

205205
Run the following command `docker compose up -d btcrpcexplorer` to start the service and check the logs to be sure that the service is running properly.
206206

207-
For this example, we can see that the service has beed started and it's connected to bitcoind (`RPC Connected: ... subversion=/Satoshi:24.0.1`)
207+
For this example, we can see that the service has beed started and it's connected to bitcoin (`RPC Connected: ... subversion=/Satoshi:24.0.1`)
208208

209209
```shell
210210
$ docker compose up -d btcrpcexplorer
@@ -223,7 +223,7 @@ $ docker logs -f c8b93a8b9410
223223
# 2023-01-02T17:21:34.479Z btcexp:app Environment(development) - Node: v16.19.0, Platform: linux, Versions: {"node":"16.19.0","v8":"9.4.146.26-node.24","uv":"1.43.0","zlib":"1.2.11","brotli":"1.0.9","ares":"1.18.1","modules":"93","nghttp2":"1.47.0","napi":"8","llhttp":"6.0.10","openssl":"1.1.1s+quic","cldr":"41.0","icu":"71.1","tz":"2022f","unicode":"14.0","ngtcp2":"0.8.1","nghttp3":"0.7.0"}
224224
# 2023-01-02T17:21:34.479Z btcexp:app No sourcecode version available, continuing to use default cacheId '3.3.0'
225225
# 2023-01-02T17:21:34.479Z btcexp:app Starting BTC RPC Explorer, v3.3.0 at http://172.18.0.5:3002/
226-
# 2023-01-02T17:21:34.479Z btcexp:app Connecting to RPC node at bitcoind:8332
226+
# 2023-01-02T17:21:34.479Z btcexp:app Connecting to RPC node at bitcoin:8332
227227
# 2023-01-02T17:21:34.484Z btcexp:app Verifying RPC connection...
228228
# 2023-01-02T17:21:34.487Z btcexp:app Loading mining pools config
229229
# 2023-01-02T17:21:34.515Z btcexp:app RPC Connected: version=240001 subversion=/Satoshi:24.0.1/, parsedVersion(used for RPC versioning)=24.0.1, protocolversion=70016, chain=main, services=[NETWORK, WITNESS, NETWORK_LIMITED]
@@ -245,7 +245,7 @@ Two files `certificate.crt` and `certificate.key` will be generated. It is impor
245245

246246
Finally, run the following command `docker compose up -d nginx` to start the service and check the logs to be sure that the service is running properly.
247247

248-
For this example, we can see that the service has beed started and it's connected to bitcoind.
248+
For this example, we can see that the service has beed started and it's connected to bitcoin.
249249

250250
```shell
251251
$ docker ps | grep nginx
@@ -268,9 +268,9 @@ If you have reached this point, you should be able to access btc-rpc-explorer an
268268

269269
## Post-installation
270270

271-
Once the node has been synchronized, we can change the bitcoind dbcache to the minimum. It is no longer necessary to have so much memory for this purpose.
271+
Once the node has been synchronized, we can change the bitcoin dbcache to the minimum. It is no longer necessary to have so much memory for this purpose.
272272

273-
Edit the bitcoind configuration file and change this parameter.
273+
Edit the bitcoin configuration file and change this parameter.
274274

275275
```conf
276276
dbcache=360

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ The following services are deployed:
3030

3131
| Service | Version | Base image | Size |
3232
| ------------------------------------------------------------------------------- | ------------ | ------------------ | --------|
33-
| <a href="https://gitlab.torproject.org/tpo/core/tor/">Tor</a> | 0.4.8.13 | debian:stable-slim | 83.2 MB |
34-
| <a href="https://github.com/bitcoin/bitcoin">Bitcoin core</a> | 28.1 | debian:stable-slim | 79.8 MB |
35-
| <a href="https://github.com/romanz/electrs">Electrs</a> | 0.10.8 | debian:stable-slim | 80.7 MB |
36-
| <a href="https://github.com/janoside/btc-rpc-explorer">Bitcoin RPC Explorer</a> | 3.4.0 | node:22-slim | 377 MB |
33+
| <a href="https://gitlab.torproject.org/tpo/core/tor/">Tor</a> | 0.4.9.6 | debian:stable-slim | 88.1 MB |
34+
| <a href="https://github.com/bitcoin/bitcoin">Bitcoin core</a> | 30.2 | debian:stable-slim | 84.2 MB |
35+
| <a href="https://github.com/romanz/electrs">Electrs</a> | 0.11.1 | debian:stable-slim | 106 MB |
36+
| <a href="https://github.com/janoside/btc-rpc-explorer">Bitcoin RPC Explorer</a> | 3.5.1 | node:22-slim | 377 MB |
3737
| <a href="https://github.com/nginxinc/docker-nginx">NGINX</a> | stable-slim | nginx:alpine-slim | 11.5 MB |
38-
| <a href="https://github.com/i2p/i2p.i2p">i2p</a> (optional) | 2.7.0 | alpine:latest | 222 MB |
38+
| <a href="https://github.com/i2p/i2p.i2p">i2p</a> (optional) | 2.11.0 | alpine:latest | 232 MB |
3939

4040
## Documentation
4141

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM debian:stable-slim AS build
22
ARG BITCOIN_VERSION
3+
34
RUN apt-get update \
4-
&& apt-get install automake autotools-dev bsdmainutils build-essential cmake curl git libtool pkg-config -y \
5+
&& apt-get install --no-install-recommends -y build-essential ca-certificates cmake curl git gpg gpg-agent patch pkg-config python3 \
56
&& cd /tmp \
67
&& curl \
78
-O https://raw.githubusercontent.com/bitcoin-core/guix.sigs/main/builder-keys/achow101.gpg \
@@ -17,30 +18,34 @@ RUN apt-get update \
1718
&& cd bitcoin \
1819
&& git verify-tag v${BITCOIN_VERSION} \
1920
&& cd depends \
20-
&& make HOST=$(gcc -dumpmachine) NO_BDB=1 NO_QT=1 NO_QR=1 NO_SQLITE=1 NO_NATPMP=1 NO_UPNP=1 NO_ZMQ=1 NO_USDT=1 NO_WALLET=1 NO_HARDEN=1 \
21+
&& make -j$(nproc) HOST=$(gcc -dumpmachine) NO_QT=1 NO_QR=1 NO_ZMQ=1 NO_USDT=1 NO_WALLET=1 \
2122
&& cd .. \
22-
&& ./autogen.sh \
23-
&& ./configure \
24-
--prefix=$PWD/depends/$(gcc -dumpmachine) LDFLAGS="-static-libstdc++ -s" \
25-
--disable-bench \
26-
--disable-cli \
27-
--disable-external-signer \
28-
--disable-fuzz-binary \
29-
--disable-man \
30-
--disable-tests \
31-
--enable-reduce-exports \
32-
--without-utils \
33-
&& make \
34-
&& gzexe src/bitcoind \
35-
&& apt-get remove automake autotools-dev bsdmainutils build-essential cmake curl git libtool pkg-config -y
23+
&& cmake -B build \
24+
--toolchain depends/$(gcc -dumpmachine)/toolchain.cmake \
25+
-DBUILD_BENCH=OFF \
26+
-DBUILD_CLI=OFF \
27+
-DENABLE_EXTERNAL_SIGNER=OFF \
28+
-DBUILD_FUZZ_BINARY=OFF \
29+
-DBUILD_TESTS=OFF \
30+
-DINSTALL_MAN=OFF \
31+
-DREDUCE_EXPORTS=ON \
32+
-DAPPEND_LDFLAGS="-static-libstdc++ -s" \
33+
&& cmake --build build -j$(nproc) \
34+
&& gzexe build/bin/bitcoind
3635

3736

3837
FROM debian:stable-slim
3938
ARG BITCOIN_USER_ID
4039
ARG GROUP_ID
41-
COPY --from=build /tmp/bitcoin/src/bitcoind /usr/local/bin/bitcoind
42-
RUN addgroup --gid ${GROUP_ID} bitcoin \
40+
41+
COPY --from=build /tmp/bitcoin/build/bin/bitcoind /usr/local/bin/bitcoind
42+
43+
RUN apt-get update \
44+
&& apt-get install -y --no-install-recommends adduser \
45+
&& rm -rf /var/lib/apt/lists/* \
46+
&& addgroup --gid ${GROUP_ID} bitcoin \
4347
&& adduser -u ${BITCOIN_USER_ID} --disabled-password --gecos "" --ingroup bitcoin bitcoin \
48+
&& apt-get remove -y adduser \
4449
&& mkdir /home/bitcoin/.bitcoin \
4550
&& chown bitcoin:bitcoin /home/bitcoin/.bitcoin
4651

btcrpcexplorer/Dockerfile

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
FROM alpine:3.18 AS build
1+
FROM alpine:3.23 AS build
22
ARG BTC_RPC_EXPLORER_VERSION
3-
RUN apk add --update --no-cache git gpg gpg-agent nodejs npm python3 wget \
3+
4+
RUN apk add --update --no-cache curl git gpg gpg-agent nodejs npm python3 \
45
&& cd /opt \
5-
&& wget -O - https://keybase.io/danjanosik/pgp_keys.asc | gpg --import \
6+
&& curl -fsSL https://keybase.io/danjanosik/pgp_keys.asc > keys.asc \
7+
&& gpg --import keys.asc \
68
&& git clone --branch v${BTC_RPC_EXPLORER_VERSION} https://github.com/janoside/btc-rpc-explorer.git \
79
&& cd btc-rpc-explorer \
810
# && git verify-tag v${BTC_RPC_EXPLORER_VERSION} \ FIXME: not working. Requested to btc-rpc-explorer developers
911
&& npm install \
10-
&& chmod 755 -R . \
11-
&& apk del git gpg gpg-agent nodejs npm python3 wget
12+
&& chmod 755 -R .
1213

1314

1415
FROM node:22-slim
1516
ARG BTC_RPC_EXPLORER_USER_ID
1617
ARG GROUP_ID
17-
COPY --from=build /opt/btc-rpc-explorer /opt/btc-rpc-explorer
18+
19+
COPY --from=build /opt/btc-rpc-explorer /opt/btcrpcexplorer
20+
1821
RUN addgroup --gid $GROUP_ID btcrpcexplorer \
1922
&& adduser -u ${BTC_RPC_EXPLORER_USER_ID} --disabled-password --gecos "" --ingroup btcrpcexplorer btcrpcexplorer \
2023
&& mkdir /home/btcrpcexplorer/.config \
21-
&& chown btcrpcexplorer:btcrpcexplorer /home/btcrpcexplorer/.config \
22-
&& cd /opt/btc-rpc-explorer
24+
&& chown btcrpcexplorer:btcrpcexplorer /home/btcrpcexplorer/.config
2325

26+
WORKDIR /opt/btcrpcexplorer
2427
USER btcrpcexplorer
2528

26-
CMD cd /opt/btc-rpc-explorer && npm start
29+
CMD npm start

docker-compose.yml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ services:
1010
volumes:
1111
- $TOR_DATA:/home/tor
1212
restart: on-failure
13-
networks:
14-
default:
15-
ipv4_address: 172.18.0.2
1613
i2p:
1714
image: i2p:$I2P_VERSION
1815
profiles:
@@ -25,34 +22,27 @@ services:
2522
- GROUP_ID=$SHARED_GID
2623
volumes:
2724
- $I2P_DATA:/i2p/.i2p
28-
environment:
29-
- EXT_PORT:7656
3025
ports:
3126
- 7657:7657
3227
restart: on-failure
33-
networks:
34-
default:
35-
ipv4_address: 172.18.0.3
36-
bitcoind:
37-
image: bitcoind:$BITCOIN_VERSION
28+
bitcoin:
29+
image: bitcoin:$BITCOIN_VERSION
3830
depends_on:
3931
- tor
32+
# - i2p
4033
build:
41-
context: ./bitcoind
34+
context: ./bitcoin
4235
args:
4336
- BITCOIN_VERSION=$BITCOIN_VERSION
4437
- BITCOIN_USER_ID=$BITCOIN_USER_ID
4538
- GROUP_ID=$SHARED_GID
4639
volumes:
4740
- $BITCOIN_DATA:/home/bitcoin/.bitcoin
4841
restart: unless-stopped
49-
networks:
50-
default:
51-
ipv4_address: 172.18.0.4
5242
electrs:
5343
image: electrs:$ELECTRS_VERSION
5444
depends_on:
55-
- bitcoind
45+
- bitcoin
5646
build:
5747
context: ./electrs
5848
args:
@@ -63,13 +53,10 @@ services:
6353
- $BITCOIN_DATA:/home/electrs/.bitcoin
6454
- $ELECTRS_DATA:/home/electrs/.electrs
6555
restart: on-failure
66-
networks:
67-
default:
68-
ipv4_address: 172.18.0.5
6956
btcrpcexplorer:
7057
image: btcrpcexplorer:$BTC_RPC_EXPLORER_VERSION
7158
depends_on:
72-
- bitcoind
59+
- bitcoin
7360
- electrs
7461
build:
7562
context: ./btcrpcexplorer
@@ -80,9 +67,6 @@ services:
8067
volumes:
8168
- $BTC_RPC_EXPLORER_DATA:/home/btcrpcexplorer/.config
8269
restart: on-failure
83-
networks:
84-
default:
85-
ipv4_address: 172.18.0.6
8670
nginx:
8771
image: nginx:alpine-slim
8872
depends_on:
@@ -94,13 +78,3 @@ services:
9478
volumes:
9579
- $NGINX_DATA:/etc/nginx
9680
restart: on-failure
97-
networks:
98-
default:
99-
ipv4_address: 172.18.0.7
100-
101-
networks:
102-
default:
103-
ipam:
104-
config:
105-
- subnet: 172.18.0.0/16
106-
gateway: 172.18.0.1

0 commit comments

Comments
 (0)