Merge pull request #952 from panasenco/dockerfile

Made rust version in Dockerfile static
This commit is contained in:
Mark Thom
2021-05-12 11:02:38 -06:00
committed by GitHub

View File

@@ -1,17 +1,18 @@
# See https://github.com/LukeMathWalker/cargo-chef
FROM rust as planner
ARG RUST_VERSION=1.52.1-buster
FROM rust:${RUST_VERSION} as planner
WORKDIR /scryer-prolog
RUN cargo install cargo-chef
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM rust as cacher
FROM rust:${RUST_VERSION} as cacher
WORKDIR /scryer-prolog
RUN cargo install cargo-chef
COPY --from=planner /scryer-prolog/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
FROM rust as builder
FROM rust:${RUST_VERSION} as builder
WORKDIR /scryer-prolog
COPY . .
# Copy over the cached dependencies