1
0
Fork 0
mirror of https://github.com/romanz/electrs.git synced 2025-02-22 14:33:09 +01:00
electrs/Dockerfile

44 lines
1.6 KiB
Text
Raw Normal View History

2021-10-20 10:58:52 +03:00
# Important: This file is provided for demonstration purposes and may NOT be suitable for production use.
# The maintainers of electrs are not deeply familiar with Docker, so you should DYOR.
# If you are not familiar with Docker either it's probably be safer to NOT use it.
2021-03-26 11:05:58 +03:00
### Electrum Rust Server ###
2021-04-16 09:46:35 +03:00
FROM rust:1.41.1-slim as electrs-build
2021-03-26 11:05:58 +03:00
RUN apt-get update
RUN apt-get install -qq -y clang cmake
# Install electrs
2021-03-26 11:05:58 +03:00
WORKDIR /build/electrs
COPY . .
RUN cargo install --locked --path .
FROM debian:buster-slim as updated
RUN apt-get update -qqy
### Bitcoin Core ###
FROM updated as bitcoin-build
# Download
RUN apt-get install -qqy wget
WORKDIR /build/bitcoin
ARG BITCOIND_VERSION=22.0
2021-08-15 21:09:52 +03:00
RUN wget -q https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz
RUN tar xvf bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz
RUN mv -v bitcoin-$BITCOIND_VERSION/bin/bitcoind .
RUN mv -v bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli .
2021-03-26 11:05:58 +03:00
FROM updated as result
# Copy the binaries
COPY --from=electrs-build /usr/local/cargo/bin/electrs /usr/bin/electrs
COPY --from=bitcoin-build /build/bitcoin/bitcoind /build/bitcoin/bitcoin-cli /usr/bin/
RUN bitcoind -version && bitcoin-cli -version
### Electrum ###
# Clone latest Electrum wallet and a few test tools
WORKDIR /build/
2021-08-27 21:09:48 +03:00
RUN apt-get install -qqy git libsecp256k1-0 python3-cryptography python3-setuptools python3-pip jq curl
2021-03-26 11:05:58 +03:00
RUN git clone --recurse-submodules https://github.com/spesmilo/electrum/ && cd electrum/ && git log -1
RUN python3 -m pip install -e electrum/
RUN electrum version --offline
WORKDIR /