mirror of
https://github.com/logos-co/nomos-node.git
synced 2026-08-27 17:41:11 +00:00
48 lines
1.8 KiB
Docker
48 lines
1.8 KiB
Docker
# BUILD IMAGE ---------------------------------------------------------
|
|
|
|
FROM rust:1.88.0-slim-bookworm AS builder
|
|
|
|
# Install dependencies needed for building RocksDB and etcd.
|
|
RUN apt-get update && apt-get install -yq \
|
|
git gcc g++ clang libssl-dev pkg-config ca-certificates curl cmake ninja-build
|
|
|
|
COPY . /nomos
|
|
|
|
WORKDIR /opt
|
|
|
|
# Commit 4d91de4e48198da2e33413efdcd9cd2cc0c46688 corresponds to Rust v1.85.0.
|
|
RUN git clone https://github.com/risc0/risc0.git && \
|
|
cd risc0 && \
|
|
cargo install --path rzup && \
|
|
rzup build rust --tag-or-commit 4d91de4e48198da2e33413efdcd9cd2cc0c46688 && \
|
|
git checkout origin/release-2.0 && \
|
|
cargo install --path risc0/cargo-risczero && \
|
|
rm -rf /usr/local/cargo/registry /usr/local/cargo/git && \
|
|
rm -rf /root/.risc0/tmp && \
|
|
rm -rf * && \
|
|
cd /nomos && \
|
|
cargo build && \
|
|
find . -type f ! -path "./target/debug/nomos-node" ! -path "./target/debug/nomos-executor" \
|
|
! -path "./target/debug/nomos-cli" ! -path "./target/debug/cfgsync-server" ! -path "./target/debug/cfgsync-client" -delete
|
|
|
|
|
|
FROM rust:1.87.0-slim-bookworm AS final
|
|
|
|
LABEL maintainer="romanzac@status.im" \
|
|
source="https://github.com/logos-co/nomos" \
|
|
description="Nomos testnet debug image"
|
|
|
|
COPY --from=builder /usr/local/cargo /usr/local/cargo
|
|
COPY --from=builder /root/.risc0 /root/.risc0
|
|
|
|
COPY --from=builder /nomos/target/debug/nomos-node /usr/bin/nomos-node
|
|
COPY --from=builder /nomos/target/debug/nomos-executor /usr/bin/nomos-executor
|
|
COPY --from=builder /nomos/target/debug/nomos-cli /usr/bin/nomos-cli
|
|
COPY --from=builder /nomos/target/debug/cfgsync-server /usr/bin/cfgsync-server
|
|
COPY --from=builder /nomos/target/debug/cfgsync-client /usr/bin/cfgsync-client
|
|
|
|
# nomos default ports
|
|
EXPOSE 3000 8080 9000 60000
|
|
|
|
ENTRYPOINT ["/usr/bin/nomos-node"]
|