Dockerfile 608 B

1234567891011121314151617181920212223242526
  1. FROM rust:bullseye AS builder
  2. RUN apt update && apt install -y wget clang cmake build-essential libclang-dev git
  3. WORKDIR /app
  4. RUN git clone https://github.com/zorp-corp/nockchain.git && \
  5. cd nockchain && \
  6. make install-choo && \
  7. make build-hoon-all && \
  8. make build
  9. FROM debian:bullseye-slim
  10. RUN apt update && apt install -y ca-certificates && rm -rf /var/lib/apt/lists/*
  11. COPY --from=builder /app/nockchain/target/release/nockchain /app/bin
  12. WORKDIR /app/data
  13. COPY entrypoint.sh /app/entrypoint.sh
  14. RUN chmod +x /app/entrypoint.sh
  15. # 设置默认命令
  16. ENTRYPOINT ["/app/entrypoint.sh"]