Dockerfile 764 B

1234567891011121314151617181920212223242526272829
  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. cp .env_example .env && \
  7. make install-hoonc && \
  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. COPY --from=builder /app/nockchain/target/release/nockchain-wallet /app/wallet/
  13. WORKDIR /app/data
  14. COPY entrypoint.sh /app/entrypoint.sh
  15. COPY checkWallet.sh /app/checkWallet.sh
  16. RUN chmod +x /app/entrypoint.sh
  17. RUN chmod +x /app/checkWallet.sh
  18. # 设置默认命令
  19. ENTRYPOINT ["/app/entrypoint.sh"]