-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathContainerfile
54 lines (44 loc) · 1.04 KB
/
Containerfile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM docker.io/debian:11.7-slim
ARG BTC_VERSION=v24.1
RUN apt-get update && \
apt-get install -y \
build-essential \
libtool \
autotools-dev \
automake \
pkg-config \
bsdmainutils \
python3 \
libevent-dev \
libboost-dev \
libsqlite3-dev \
libminiupnpc-dev \
libnatpmp-dev \
libzmq3-dev \
systemtap-sdt-dev \
git && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt
RUN git clone --depth 1 --branch ${BTC_VERSION} https://github.com/bitcoin/bitcoin && \
cd bitcoin && \
./autogen.sh && \
./configure \
--enable-debug \
--enable-usdt \
--with-sqlite=yes \
--without-bdb \
--with-miniupnpc \
--with-natpmp \
--with-utils \
--with-daemon \
--with-gui=no && \
make -j$(nproc) && \
make install && \
cd .. && \
rm -rf bitcoin
RUN useradd --user-group --create-home rpc
USER rpc
WORKDIR /home/rpc
# Default data directory when running the bitcoin daemon on regtest
RUN mkdir -p .bitcoin/regtest
ENTRYPOINT ["/usr/local/bin/bitcoind", "-regtest", "-server"]