Made rust version in Dockerfile static, this seems to have really fixed the cache issues
This commit is contained in:
@@ -1,17 +1,18 @@
|
|||||||
# See https://github.com/LukeMathWalker/cargo-chef
|
# 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
|
WORKDIR /scryer-prolog
|
||||||
RUN cargo install cargo-chef
|
RUN cargo install cargo-chef
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN cargo chef prepare --recipe-path recipe.json
|
RUN cargo chef prepare --recipe-path recipe.json
|
||||||
|
|
||||||
FROM rust as cacher
|
FROM rust:${RUST_VERSION} as cacher
|
||||||
WORKDIR /scryer-prolog
|
WORKDIR /scryer-prolog
|
||||||
RUN cargo install cargo-chef
|
RUN cargo install cargo-chef
|
||||||
COPY --from=planner /scryer-prolog/recipe.json recipe.json
|
COPY --from=planner /scryer-prolog/recipe.json recipe.json
|
||||||
RUN cargo chef cook --release --recipe-path recipe.json
|
RUN cargo chef cook --release --recipe-path recipe.json
|
||||||
|
|
||||||
FROM rust as builder
|
FROM rust:${RUST_VERSION} as builder
|
||||||
WORKDIR /scryer-prolog
|
WORKDIR /scryer-prolog
|
||||||
COPY . .
|
COPY . .
|
||||||
# Copy over the cached dependencies
|
# Copy over the cached dependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user