Commit 80c8c0c 1 parent 74a8707 commit 80c8c0c Copy full SHA for 80c8c0c
File tree 1 file changed +62
-0
lines changed
1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM debian:stable-slim as builder
2
+
3
+ ENV DEBIAN_FRONTEND=non-interactive
4
+
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ automake pkg-config \
8
+ wget curl libzmq3-dev \
9
+ libtool autotools-dev \
10
+ bsdmainutils python3 \
11
+ libsqlite3-dev libdb-dev \
12
+ libdb++-dev libevent-dev \
13
+ libboost-dev libboost-system-dev \
14
+ libboost-filesystem-dev libboost-test-dev
15
+
16
+ RUN git clone https://github.com/bitcoin/bitcoin.git /bitcoin
17
+
18
+ WORKDIR /bitcoin
19
+
20
+ RUN ./autogen.sh
21
+ RUN ./configure \
22
+ CXXFLAGS="-O2" \
23
+ --disable-man \
24
+ --disable-shared \
25
+ --disable-ccache \
26
+ --disable-tests \
27
+ --enable-static \
28
+ --enable-reduce-exports \
29
+ --without-gui \
30
+ --without-libs \
31
+ --with-utils \
32
+ --with-zmq \
33
+ --with-sqlite=yes \
34
+ --without-miniupnpc \
35
+ --with-incompatible-bdb
36
+ RUN make clean
37
+ RUN make -j$(( $(nproc) + 1 ))
38
+
39
+ FROM debian:stable-slim
40
+
41
+ ENV DEBIAN_FRONTEND=non-interactive
42
+
43
+ RUN useradd -ms /bin/bash bitcoin
44
+ USER bitcoin
45
+ WORKDIR /home/bitcoin
46
+
47
+ # Only install what we need at runtime
48
+ RUN apt-get update && apt-get install -y \
49
+ libminiupnpc-dev libnatpmp-dev libevent-dev libzmq3-dev libsqlite3-dev
50
+
51
+ COPY --from=builder /bitcoin/src/bitcoind /usr/local/bin/
52
+ COPY --from=builder /bitcoin/src/bitcoin-cli /usr/local/bin/
53
+
54
+ EXPOSE 18443 18444
55
+
56
+ # Prevents `VOLUME $HOME/.bitcoin/` being created as owned by `root`
57
+ RUN mkdir -p "$HOME/.bitcoin/"
58
+ COPY bitcoin.conf "$HOME/bitcoin.conf"
59
+
60
+ VOLUME /home/bitcoin/.bitcoin
61
+
62
+ ENTRYPOINT ["bitcoind" , "-printtoconsole" ]
You can’t perform that action at this time.
0 commit comments