Skip to content

Commit dd750c2

Browse files
Johan-Liebert1cgwalters
authored andcommitted
dockerfile: Clear cargo's local cache before fetching
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
1 parent 4ec8a85 commit dd750c2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ WORKDIR /src
3434
# We aren't using the full recommendations there, just the simple bits.
3535
# First we download all of our Rust dependencies
3636
# Note: Local path dependencies (from [patch] sections) are auto-detected and bind-mounted by the Justfile
37-
RUN --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/src/target --mount=type=cache,target=/var/roothome cargo fetch
37+
RUN --mount=type=tmpfs,target=/run --mount=type=tmpfs,target=/tmp --mount=type=cache,target=/src/target --mount=type=cache,target=/var/roothome \
38+
rm -rf /var/roothome/.cargo/registry; cargo fetch
3839

3940
# We always do a "from scratch" build
4041
# https://docs.fedoraproject.org/en-US/bootc/building-from-scratch/

0 commit comments

Comments
 (0)