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.
|
|
|
|
|
2022-11-06 18:23:39 +01:00
|
|
|
FROM debian:bookworm-slim as base
|
2021-07-07 14:02:38 +02:00
|
|
|
RUN apt-get update -qqy
|
2023-06-28 17:39:15 +02:00
|
|
|
RUN apt-get install -qqy librocksdb-dev
|
2021-07-07 14:02:38 +02:00
|
|
|
|
2021-03-26 09:05:58 +01:00
|
|
|
### Electrum Rust Server ###
|
2021-07-07 14:02:38 +02:00
|
|
|
FROM base as electrs-build
|
2023-06-28 17:39:15 +02:00
|
|
|
RUN apt-get install -qqy cargo clang cmake
|
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 /
|