Skip to content

Commit 152abbb

Browse files
committed
bitcoin 27.0
1 parent 80c8c0c commit 152abbb

File tree

2 files changed

+26
-74
lines changed

2 files changed

+26
-74
lines changed

27.0/Dockerfile

+26-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1-
FROM ubuntu:20.04 AS builder
1+
FROM debian:stable-slim as builder
2+
3+
# VERSION of BItcoin Core to be build
4+
ARG VERSION=27.0
25

36
ENV DEBIAN_FRONTEND=non-interactive
47

58
RUN apt-get update && apt-get install -y \
6-
automake autotools-dev bsdmainutils build-essential ccache git libboost-dev \
7-
libboost-filesystem-dev libboost-system-dev libboost-test-dev libevent-dev \
8-
libminiupnpc-dev libnatpmp-dev libsqlite3-dev libtool libzmq3-dev pkg-config \
9-
python3 systemtap-sdt-dev
9+
build-essential \
10+
automake pkg-config \
11+
wget curl libzmq3-dev \
12+
libtool autotools-dev \
13+
bsdmainutils python3 git \
14+
libsqlite3-dev libdb-dev \
15+
libdb++-dev libevent-dev \
16+
libboost-dev libboost-system-dev \
17+
libboost-filesystem-dev libboost-test-dev
1018

11-
RUN git clone https://github.com/bitcoin/bitcoin.git /bitcoin
19+
RUN wget -qO- https://bitcoincore.org/bin/bitcoin-core-$VERSION/bitcoin-$VERSION.tar.gz | tar -xvz
1220

13-
WORKDIR /bitcoin
21+
WORKDIR /bitcoin-$VERSION
1422

1523
RUN ./autogen.sh
1624
RUN ./configure \
@@ -29,19 +37,25 @@ RUN ./configure \
2937
--without-miniupnpc \
3038
--with-incompatible-bdb
3139
RUN make clean
32-
RUN make -j$(nproc)
40+
RUN make -j$(( $(nproc) + 1 ))
3341

34-
FROM ubuntu:20.04
42+
FROM debian:stable-slim
3543

3644
ENV DEBIAN_FRONTEND=non-interactive
3745

3846
RUN useradd -ms /bin/bash bitcoin
39-
USER bitcoin
40-
WORKDIR /home/bitcoin
47+
48+
# Switch to root user
49+
USER root
4150

4251
# Only install what we need at runtime
4352
RUN apt-get update && apt-get install -y \
44-
libminiupnpc-dev libnatpmp-dev libevent-dev libzmq3-dev libsqlite3-dev
53+
libminiupnpc-dev libnatpmp-dev libevent-dev libzmq3-dev libsqlite3-dev
54+
55+
# Switch back to bitcoin user
56+
USER bitcoin
57+
58+
WORKDIR /home/bitcoin
4559

4660
COPY --from=builder /bitcoin/src/bitcoind /usr/local/bin/
4761
COPY --from=builder /bitcoin/src/bitcoin-cli /usr/local/bin/

27.0/faster.Dockerfile

-62
This file was deleted.

0 commit comments

Comments
 (0)