Skip to content

Commit

Permalink
Merge pull request #763 from kristof-mattei/update-cache-ids
Browse files Browse the repository at this point in the history
fix: updated cache ids
  • Loading branch information
kristof-mattei authored Mar 28, 2023
2 parents 59a782d + 75f6e51 commit bd0e7cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ WORKDIR /build
RUN cargo new ${APPLICATION_NAME}
WORKDIR /build/${APPLICATION_NAME}
COPY Cargo.toml Cargo.lock ./
RUN --mount=type=cache,id=before-build,target=/build/${APPLICATION_NAME}/target \
RUN --mount=type=cache,id=cargo-dependencies,target=/build/${APPLICATION_NAME}/target \
cargo build --release --target ${TARGET}

# now we copy in the source which is more prone to changes and build it
COPY src ./src
# --release not needed, it is implied with install
RUN --mount=type=cache,id=after-build,target=/build/${APPLICATION_NAME}/target \
RUN --mount=type=cache,id=full-build,target=/build/${APPLICATION_NAME}/target \
cargo install --path . --target ${TARGET} --root /output

FROM alpine:3.17.2@sha256:ff6bdca1701f3a8a67e328815ff2346b0e4067d32ec36b7992c1fdc001dc8517
Expand Down

0 comments on commit bd0e7cd

Please sign in to comment.