Dockerfile 417 B

1234567891011121314151617181920
  1. ARG RUST_VERSION=1.66.1
  2. FROM rust:${RUST_VERSION} AS build
  3. # Set default toolchain
  4. RUN rustup default nightly-2023-07-23
  5. # Build
  6. WORKDIR /src
  7. COPY fortuna fortuna
  8. COPY pythnet pythnet
  9. WORKDIR /src/fortuna
  10. RUN --mount=type=cache,target=/root/.cargo/registry cargo build --release
  11. FROM rust:${RUST_VERSION}
  12. # Copy artifacts from other images
  13. COPY --from=build /src/fortuna/target/release/fortuna /usr/local/bin/