forked from Start9Labs/electrs-startos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (27 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM rust:1.48.0-slim AS builder
ARG VERSION
WORKDIR /build
RUN apt-get update
RUN apt-get install -y git clang cmake libsnappy-dev
COPY ./electrs .
RUN cargo install --locked --path .
FROM debian:buster-slim
RUN apt update && apt install -y bash curl netcat tini wget
ARG PLATFORM
ARG ARCH
RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${PLATFORM} && chmod +x /usr/local/bin/yq
COPY --from=builder /usr/local/cargo/bin/electrs /bin/electrs
ADD ./configurator/target/${ARCH}-unknown-linux-musl/release/configurator /usr/local/bin/configurator
ADD ./docker_entrypoint.sh /usr/local/bin/docker_entrypoint.sh
RUN chmod a+x /usr/local/bin/docker_entrypoint.sh
ADD ./check-electrum.sh /usr/local/bin/check-electrum.sh
RUN chmod a+x /usr/local/bin/check-electrum.sh
ADD ./check-synced.sh /usr/local/bin/check-synced.sh
RUN chmod a+x /usr/local/bin/check-synced.sh
WORKDIR /data
# Electrum RPC
EXPOSE 50001
# Prometheus monitoring
EXPOSE 4224
STOPSIGNAL SIGINT
ENTRYPOINT ["docker_entrypoint.sh"]