forked from keep-starknet-strange/madara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (33 loc) · 1.27 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
FROM rust:slim-buster as builder
RUN apt-get -y update; \
apt-get install -y --no-install-recommends \
libssl-dev make clang-11 g++ llvm protobuf-compiler \
pkg-config libz-dev zstd git; \
apt-get autoremove -y; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*
WORKDIR /madara
COPY . .
RUN cargo build --release -Z sparse-registry --config net.git-fetch-with-cli=true
FROM debian:buster-slim
LABEL description="Madara, a blazing fast Starknet sequencer" \
authors="Oak <me+madara@droak.sh>" \
source="https://github.com/keep-starknet-strange/madara" \
documentation="https://docs.madara.zone/"
# TODO: change the way chain-specs are copied on the node
COPY --from=builder /madara/target/release/madara /madara-bin
RUN apt-get -y update; \
apt-get install -y --no-install-recommends \
curl; \
apt-get autoremove -y; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*
HEALTHCHECK --interval=10s --timeout=30s --start-period=10s --retries=10 \
CMD curl --request POST \
--header "Content-Type: application/json" \
--data '{"jsonrpc": "2.0","method": "starknet_chainId","id":1}' http://localhost:9944 || exit 1
# 9444 JSON-RPC server
# 9615 Prometheus exporter
# 30333 P2P communication
EXPOSE 9944 9615 30333
ENTRYPOINT ["/madara-bin"]