Dockerfile 709 B

1234567891011121314151617181920212223242526
  1. # The rust version itself is not so important as we install a fixed
  2. # nightly version. We use the latest stable version to get the latest
  3. # updates and dependencies.
  4. FROM rust:1.77.0 AS build
  5. # Install OS packages
  6. RUN apt-get update && apt-get install --yes \
  7. build-essential curl clang libssl-dev protobuf-compiler
  8. # Set default toolchain
  9. RUN rustup default nightly-2024-03-26
  10. # Build
  11. WORKDIR /src
  12. COPY apps/hermes apps/hermes
  13. COPY pythnet/pythnet_sdk pythnet/pythnet_sdk
  14. WORKDIR /src/apps/hermes
  15. RUN --mount=type=cache,target=/root/.cargo/registry cargo build --release
  16. FROM rust:1.77.0
  17. # Copy artifacts from other images
  18. COPY --from=build /src/apps/hermes/target/release/hermes /usr/local/bin/