File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Build the Mina light node.
1+ # Build the Mina light node (mina-relay + the mina-verify trust gate).
2+ #
3+ # It compiles mina-verify's recursive-proof verifier (proof-systems / kimchi), which
4+ # needs a C toolchain + openssl at build time and libssl at runtime.
5+
26FROM rust:1-bookworm AS build
7+ # rust:1-bookworm (buildpack-deps based) already ships these, but be explicit so the
8+ # build can't silently depend on the base image's contents.
9+ RUN apt-get update && apt-get install -y --no-install-recommends \
10+ build-essential pkg-config libssl-dev git ca-certificates \
11+ && rm -rf /var/lib/apt/lists/*
312WORKDIR /src
413COPY . .
5- RUN cargo build --release -p mina-light-node
14+ RUN cargo build --release --locked -p mina-light-node
15+ RUN strip target/release/mina-light-node
616
717FROM debian:bookworm-slim
8- RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
18+ # libssl3: the binary links openssl dynamically (openssl-sys in the dep tree).
19+ RUN apt-get update && apt-get install -y --no-install-recommends \
20+ ca-certificates libssl3 \
921 && rm -rf /var/lib/apt/lists/*
1022COPY --from=build /src/target/release/mina-light-node /usr/local/bin/mina-light-node
23+ # Out of the box: connect to devnet seeds and verify forever, no configuration.
24+ # Switch networks with `-e MINA_NETWORK=mainnet`.
1125ENV MINA_NETWORK=devnet
26+ ENV RUST_LOG=info
1227ENTRYPOINT ["mina-light-node" ]
Original file line number Diff line number Diff line change 1- # Mina light node — joins p2p (mina-relay) + verifies (mina-verify).
2- # TODO: add the verify sidecar (MinaProtocol/mina-verify mina-verify-server) once
3- # the trust gate is wired, or run verification in-process.
1+ # Mina light node — joins p2p (mina-relay) + verifies every tip (mina-verify),
2+ # in-process. No sidecar, no configuration.
3+ #
4+ # One process follows exactly ONE network: the libp2p pnet key is derived from the
5+ # chain id, so a devnet swarm cannot even decrypt mainnet traffic, and Mina's network
6+ # config is process-global (set once). So it's one container per network — same image,
7+ # different MINA_NETWORK. Both services below build the same image.
8+ #
9+ # docker compose -f deploy/docker-compose.yml up --build # devnet (default)
10+ # docker compose -f deploy/docker-compose.yml --profile mainnet up # mainnet
411services :
5- mina-light-node :
12+ devnet :
13+ image : mina-light-node:latest
614 build :
715 context : ..
816 dockerfile : deploy/Dockerfile
917 environment :
1018 MINA_NETWORK : devnet
1119 RUST_LOG : info
20+ # LIGHT_NODE_SECS unset => run forever.
21+ restart : unless-stopped
22+
23+ mainnet :
24+ image : mina-light-node:latest
25+ profiles : ["mainnet"]
26+ build :
27+ context : ..
28+ dockerfile : deploy/Dockerfile
29+ environment :
30+ MINA_NETWORK : mainnet
31+ RUST_LOG : info
1232 restart : unless-stopped
You can’t perform that action at this time.
0 commit comments