Dockerfile 396 B

12345678910111213141516171819
  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. WORKDIR /src/fortuna
  9. RUN --mount=type=cache,target=/root/.cargo/registry cargo build --release
  10. FROM rust:${RUST_VERSION}
  11. # Copy artifacts from other images
  12. COPY --from=build /src/fortuna/target/release/fortuna /usr/local/bin/