-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathbitcoin.Dockerfile
More file actions
34 lines (29 loc) · 899 Bytes
/
bitcoin.Dockerfile
File metadata and controls
34 lines (29 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Use the official Nix base image
FROM nixos/nix:latest
# Define build arguments with defaults
ARG NODE_USERNAME
ARG NODE_PASSWORD
# Install bitcoind and basic tools via Nix
RUN nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs && \
nix-channel --update && \
nix-env -iA nixpkgs.bitcoind nixpkgs.coreutils
# Create data directory
RUN mkdir -p /data/bitcoin
# Expose Bitcoin RPC port and P2P port
EXPOSE 18443
EXPOSE 18444
# Set the entrypoint using shell form to enable variable interpolation
ENTRYPOINT exec /root/.nix-profile/bin/bitcoind \
"-datadir=/data/bitcoin" \
"-printtoconsole" \
"-regtest=1" \
"-server=1" \
"-txindex=1" \
"-rpcbind=0.0.0.0:18443" \
"-rpcallowip=0.0.0.0/0" \
"-rpcuser=custom_user" \
"-rpcpassword=custom_pass" \
"-rpcworkqueue=64" \
"-rpcthreads=8" \
"-fallbackfee=0.0002" \
"-debug=1"