-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (26 loc) · 1.19 KB
/
Dockerfile
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
FROM docker.io/debian:12 AS build
WORKDIR /build
# TINI
ARG TARGETARCH
ARG TINI_VERSION=0.19.0
ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-static-${TARGETARCH} /build/out/tini
RUN chmod +x /build/out/tini
RUN apt-get update && apt-get install -y build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 curl bison flex cmake
# BITCOIN-CORE
ARG BITCOIN_VERSION
ADD https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz .
RUN tar xzf bitcoin-${BITCOIN_VERSION}.tar.gz
WORKDIR bitcoin-${BITCOIN_VERSION}
RUN make -C depends NO_QT=1 NO_QR=1
RUN ./autogen.sh && \
CONFIG_SITE=$PWD/depends/$(./depends/config.guess)/share/config.site LDFLAGS="-static-libgcc -static-libstdc++" ./configure \
--prefix= --disable-man --with-gui=no --with-libs=no --disable-bench --disable-tests \
&& make && make DESTDIR=/build/out install
RUN mkdir -p /build/out/var/lib/bitcoin
# Build output image
FROM gcr.io/distroless/base-debian12
COPY --from=build /build/out /
ENV BITCOIN_DATA=/var/lib/bitcoin
VOLUME /var/lib/bitcoin
EXPOSE 8332 8333 18332 18333 18443 18444 38333 38332
ENTRYPOINT ["/tini", "--", "/bin/bitcoind"]