Skip to content

Commit 1f31445

Browse files
committed
Mention ~/.cargo/
1 parent a42089f commit 1f31445

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ RUN apk add --no-cache llvm-libunwind \
55
&& apk add --no-cache --virtual .build-rust rust cargo \
66
&& cargo build --release \
77
&& cp target/release/mini-docker-rust . \
8-
&& rm -rf target/ \
8+
&& rm -rf target/ ~/.cargo/ \
99
&& apk del --purge .build-rust
1010
ENTRYPOINT ["./mini-docker-rust"]

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ RUN apk add --no-cache llvm-libunwind \
2929
&& cargo build --release \
3030
# After that we copy our binary to the project root (you need to adjust this to your project)
3131
&& cp target/release/mini-docker-rust . \
32-
# And discard the target/ directory so it won't bloat our image
33-
&& rm -rf target/ \
32+
# Discard the target/ and ~/.cargo/ directory so it won't bloat our image
33+
&& rm -rf target/ ~/.cargo/ \
3434
# As the final cleanup step we uninstall our virtual package
3535
# This uninstalls cargo, rust and all dependencies that aren't needed anymore so they won't end up in the final image
3636
&& apk del --purge .build-rust

0 commit comments

Comments
 (0)