Dockerfile 587 B

12345678910111213141516171819
  1. ARG RUST_VERSION=1.88.0
  2. FROM rust:${RUST_VERSION} AS build
  3. # Build
  4. WORKDIR /src
  5. COPY apps/fortuna apps/fortuna
  6. COPY pythnet pythnet
  7. COPY Cargo.lock .
  8. COPY target_chains/ethereum/entropy_sdk/solidity/abis target_chains/ethereum/entropy_sdk/solidity/abis
  9. RUN --mount=type=cache,target=/root/.cargo/registry \
  10. printf "[workspace]\nresolver = \"2\"\nmembers = [\"apps/fortuna\",\"pythnet/pythnet_sdk\"]" > Cargo.toml && \
  11. cargo build --release -p fortuna
  12. FROM rust:${RUST_VERSION}
  13. # Copy artifacts from other images
  14. COPY --from=build /src/target/release/fortuna /usr/local/bin/