Skip to content

Commit

Permalink
chore(docker): use an alternative method to fetch registry
Browse files Browse the repository at this point in the history
Recommended workaround from <LukeMathWalker/cargo-chef#107>
  • Loading branch information
orhun committed Jul 21, 2022
1 parent 7fdcf4d commit 220d6e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ RUN cargo chef prepare --recipe-path recipe.json

FROM lukemathwalker/cargo-chef:0.1.35-rust-1.60-slim-buster as cacher
WORKDIR app
RUN apt-get update && \
apt-get install -y --no-install-recommends \
--allow-unauthenticated git
COPY --from=planner /app/recipe.json recipe.json
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
RUN cargo chef cook --release --recipe-path recipe.json

FROM rust:1.60.0-slim-buster as builder
Expand Down

0 comments on commit 220d6e6

Please sign in to comment.