Skip to content

Commit 2db59c6

Browse files
committed
Add dockerfile and regtest-config files
1 parent d6669b2 commit 2db59c6

File tree

2 files changed

+36
-8
lines changed

2 files changed

+36
-8
lines changed
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
# Use Rust 1.81.0 as the base image
21
FROM rust:1.81.0
32

4-
# Install required dependencies
5-
RUN apt-get update && apt-get install -y git build-essential clang
3+
# Set up Rust and cargo
4+
RUN apt-get update && apt-get install git build-essential clang -y
65

7-
# Copy the entire project, except whats defined in .dockerignore
8-
COPY . .
6+
# Set the working directory to the repo root
7+
WORKDIR /app
98

10-
# Build the 'zebrad' binary with the 'getblocktemplate-rpcs' feature enabled
9+
# Copy the entire repository content (from parent directory)
10+
COPY .. .
11+
12+
# Build zebrad with the required features
1113
RUN cargo build --release --package zebrad --bin zebrad --features="getblocktemplate-rpcs"
1214

13-
# Expose the default Zebra node RPC port
1415
EXPOSE 18232
1516

16-
# Set the entrypoint
17+
# Copy the config file from the testnet-single-node-deploy folder
18+
COPY regtest-config.toml regtest-config.toml
19+
20+
# Run the zebra node
1721
ENTRYPOINT ["target/release/zebrad", "-c", "regtest-config.toml"]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[mining]
2+
miner_address = 'tmLTZegcJN5zaufWQBARHkvqC62mTumm3jR'
3+
4+
[network]
5+
network = "Regtest"
6+
7+
# This section may be omitted when testing only Canopy
8+
[network.testnet_parameters.activation_heights]
9+
# Configured activation heights must be greater than or equal to 1,
10+
# block height 0 is reserved for the Genesis network upgrade in Zebra
11+
NU5 = 1
12+
NU6 = 1
13+
NU7 = 1
14+
15+
# This section may be omitted if a persistent Regtest chain state is desired
16+
[state]
17+
ephemeral = true
18+
19+
# This section may be omitted if it's not necessary to send transactions to Zebra's mempool
20+
[rpc]
21+
listen_addr = "0.0.0.0:18232"
22+
23+
# disable cookie auth
24+
enable_cookie_auth = false

0 commit comments

Comments
 (0)