1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 09:54:09 +01:00
electrs/Dockerfile

25 lines
752 B
Docker
Raw Normal View History

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.
FROM debian:bookworm-slim as base
RUN apt-get update -qqy
RUN apt-get install -qqy librocksdb-dev curl
2021-03-26 09:05:58 +01:00
### Electrum Rust Server ###
FROM base as electrs-build
RUN apt-get install -qqy cargo clang cmake
2021-03-26 09:05:58 +01:00
# Install electrs
2021-03-26 09:05:58 +01:00
WORKDIR /build/electrs
COPY . .
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 .
FROM base as result
2021-03-26 09:05:58 +01:00
# Copy the binaries
COPY --from=electrs-build /root/.cargo/bin/electrs /usr/bin/electrs
2021-03-26 09:05:58 +01:00
WORKDIR /