27 lines
964 B
Docker
27 lines
964 B
Docker
|
# Use a minimal base image (Ubuntu)
|
||
|
FROM debian:bookworm-slim
|
||
|
|
||
|
# Set environment variables and install dependencies
|
||
|
RUN apt-get update && apt-get install -y \
|
||
|
build-essential \
|
||
|
pkg-config \
|
||
|
libssl-dev \
|
||
|
git \
|
||
|
curl \
|
||
|
protobuf-compiler \
|
||
|
cargo \
|
||
|
&& apt-get clean
|
||
|
|
||
|
# Install Rust (needed for Nexus node)
|
||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||
|
|
||
|
# Set Rust environment path
|
||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||
|
|
||
|
RUN echo "curl https://cli.nexus.xyz/ > nexus.sh" > run.sh
|
||
|
RUN echo "sed -i 's|cargo run --release --bin prover -- beta.orchestrator.nexus.xyz|cargo run --config net.git-fetch-with-cli=true --release --bin prover -- beta.orchestrator.nexus.xyz|g' nexus.sh" >> run.sh
|
||
|
RUN echo "sh -c echo Y | cat nexus.sh | sh & tail -f /dev/null" >> run.sh
|
||
|
RUN chmod +x run.sh
|
||
|
|
||
|
# Set the default command to run the Nexus node setup script, automatically agreeing to the terms
|
||
|
CMD ["sh", "-c", "sh run.sh"]
|