mirror of
https://github.com/vacp2p/status-rln-prover.git
synced 2026-01-09 21:48:07 -05:00
* chore: add karma_sc_test, karma_tiers_test, rln_sc_test script * chore: fix rustls panic erro in prover_cli * fix: update TierLimits's validate method to handle first tier's minKarma starts at 0 * chore: add NoTier * chore: update Dockerfile * chore: update rust version and tooling to build rocksdb deps * fix: refactor smart contract interaction scripts, add error enum and remove unuse codes * fix: add PRIVATE_KEY env variable, seperate specific error types, update Dockerfile, remove config.example.toml and use clap's default_value instead * chore: update Dockerfile * chore: remove unuse register_user_with_commitment and redundant KarmaSCInstance::from
50 lines
1.1 KiB
Docker
50 lines
1.1 KiB
Docker
# Stage 1: Build Prover
|
|
FROM rust:1.89-slim-bookworm AS builder
|
|
|
|
RUN apt update && apt install -y \
|
|
pkg-config \
|
|
libssl-dev \
|
|
protobuf-compiler \
|
|
libclang-dev \
|
|
clang \
|
|
build-essential \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Working directory
|
|
WORKDIR /app
|
|
|
|
COPY Cargo.toml Cargo.lock ./
|
|
COPY proto ./proto
|
|
COPY prover ./prover
|
|
COPY prover_cli ./prover_cli
|
|
COPY prover_client ./prover_client
|
|
COPY rln_proof ./rln_proof
|
|
COPY smart_contract ./smart_contract
|
|
RUN cargo build --release
|
|
|
|
# Stage 2: Run Prover
|
|
FROM ubuntu:25.04
|
|
|
|
RUN groupadd -r user && useradd -r -g user user
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy the entrypoint script and make it executable
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
# Copy from the builder stage
|
|
COPY --from=builder /app/target/release/prover_cli ./prover_cli
|
|
COPY mock ./mock
|
|
|
|
RUN chown -R user:user /app
|
|
RUN chown user:user /usr/local/bin/docker-entrypoint.sh
|
|
|
|
USER user
|
|
|
|
# Exppose default port
|
|
EXPOSE 50051
|
|
|
|
# Run the prover - shell script will build arguments with parsed env var
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|