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.
|
|
|
|
|
2022-11-06 19:23:39 +02:00
|
|
|
FROM debian:bookworm-slim as base
|
2021-07-07 15:02:38 +03:00
|
|
|
RUN apt-get update -qqy
|
2023-07-26 14:28:03 +02:00
|
|
|
RUN apt-get install -qqy librocksdb-dev curl
|
2021-07-07 15:02:38 +03:00
|
|
|
|
2021-03-26 11:05:58 +03:00
|
|
|
### Electrum Rust Server ###
|
2021-07-07 15:02:38 +03:00
|
|
|
FROM base as electrs-build
|
2023-06-28 18:39:15 +03:00
|
|
|
RUN apt-get install -qqy cargo clang cmake
|
2021-03-26 11:05:58 +03:00
|
|
|
|
2021-09-15 17:50:09 +03:00
|
|
|
# Install electrs
|
2021-03-26 11:05:58 +03:00
|
|
|
WORKDIR /build/electrs
|
|
|
|
COPY . .
|
2021-07-07 15:02:38 +03:00
|
|
|
ENV ROCKSDB_INCLUDE_DIR=/usr/include
|
|
|
|
ENV ROCKSDB_LIB_DIR=/usr/lib
|
2021-03-26 11:05:58 +03:00
|
|
|
RUN cargo install --locked --path .
|
|
|
|
|
2021-07-07 15:02:38 +03:00
|
|
|
FROM base as result
|
2021-03-26 11:05:58 +03:00
|
|
|
# Copy the binaries
|
2021-07-07 15:02:38 +03:00
|
|
|
COPY --from=electrs-build /root/.cargo/bin/electrs /usr/bin/electrs
|
2021-03-26 11:05:58 +03:00
|
|
|
|
|
|
|
WORKDIR /
|