2021-10-20 09:58:52 +02: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-07-07 14:02:38 +02:00
|
|
|
FROM debian:bullseye-slim as base
|
|
|
|
RUN apt-get update -qqy
|
|
|
|
RUN apt-get install -qqy librocksdb-dev=6.11.4-3
|
|
|
|
|
2021-03-26 09:05:58 +01:00
|
|
|
### Electrum Rust Server ###
|
2021-07-07 14:02:38 +02:00
|
|
|
FROM base as electrs-build
|
|
|
|
RUN apt-get install -qqy cargo clang cmake build-essential
|
2021-03-26 09:05:58 +01:00
|
|
|
|
2021-09-15 16:50:09 +02:00
|
|
|
# Install electrs
|
2021-03-26 09:05:58 +01:00
|
|
|
WORKDIR /build/electrs
|
|
|
|
COPY . .
|
2021-07-07 14:02:38 +02:00
|
|
|
ENV ROCKSDB_INCLUDE_DIR=/usr/include
|
|
|
|
ENV ROCKSDB_LIB_DIR=/usr/lib
|
2021-03-26 09:05:58 +01:00
|
|
|
RUN cargo install --locked --path .
|
|
|
|
|
2021-07-07 14:02:38 +02:00
|
|
|
FROM base as result
|
2021-03-26 09:05:58 +01:00
|
|
|
# Copy the binaries
|
2021-07-07 14:02:38 +02:00
|
|
|
COPY --from=electrs-build /root/.cargo/bin/electrs /usr/bin/electrs
|
2021-03-26 09:05:58 +01:00
|
|
|
|
|
|
|
WORKDIR /
|