
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 5m8s
61 lines
1.6 KiB
Docker
61 lines
1.6 KiB
Docker
FROM alpine:3.15 as build
|
|
|
|
ARG BITCOIN_TAG=24.0.1
|
|
|
|
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
|
|
RUN apk update && apk --no-cache add autoconf \
|
|
automake \
|
|
boost-dev \
|
|
build-base \
|
|
chrpath \
|
|
file \
|
|
gnupg \
|
|
libevent-dev \
|
|
libressl \
|
|
libtool \
|
|
linux-headers \
|
|
sqlite-dev \
|
|
git
|
|
|
|
RUN git clone https://github.com/bitcoin/bitcoin.git -b v$BITCOIN_TAG /src/bitcoin
|
|
|
|
WORKDIR /src/bitcoin
|
|
|
|
RUN ./autogen.sh
|
|
RUN ./configure --with-gui=no \
|
|
--with-daemon \
|
|
--without-miniupnpc \
|
|
--without-bdb \
|
|
--disable-tests \
|
|
--disable-man \
|
|
--enable-util-cli \
|
|
--disable-static \
|
|
--disable-bench \
|
|
--disable-fuzz-binary \
|
|
--with-sqlite=yes
|
|
RUN make -j$(nproc)
|
|
RUN make install
|
|
RUN strip /usr/local/bin/bitcoin-cli
|
|
RUN strip /usr/local/bin/bitcoind
|
|
RUN strip /usr/local/bin/bitcoin-util
|
|
RUN strip /usr/local/lib/libbitcoinconsensus.so.0.0.0
|
|
|
|
# Build stage for compiled artifacts
|
|
FROM alpine:3.15
|
|
|
|
RUN addgroup -S -g 1000 bitcoin
|
|
RUN adduser -G bitcoin -S -u 1000 bitcoin
|
|
|
|
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
|
|
RUN apk --no-cache add \
|
|
boost \
|
|
libevent \
|
|
su-exec
|
|
|
|
COPY --from=build /usr/local/bin/bitcoind /usr/local/bin/bitcoin-cli /usr/local/bin/bitcoin-util /usr/local/bin/
|
|
COPY --from=build /usr/local/lib/* /usr/local/lib/
|
|
COPY --from=build /usr/local/include/* /usr/local/include/
|
|
COPY --from=build /src/bitcoin/test/functional/test_framework/ /bitcoin/test/functional/test_framework
|
|
|
|
USER bitcoin
|