File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ RUN apk add --no-cache llvm-libunwind \
5
5
&& apk add --no-cache --virtual .build-rust rust cargo \
6
6
&& cargo build --release \
7
7
&& cp target/release/mini-docker-rust . \
8
- && rm -rf target/ \
8
+ && rm -rf target/ ~/.cargo/ \
9
9
&& apk del --purge .build-rust
10
10
ENTRYPOINT ["./mini-docker-rust" ]
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ RUN apk add --no-cache llvm-libunwind \
29
29
&& cargo build --release \
30
30
# After that we copy our binary to the project root (you need to adjust this to your project)
31
31
&& 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/ \
34
34
# As the final cleanup step we uninstall our virtual package
35
35
# This uninstalls cargo, rust and all dependencies that aren't needed anymore so they won't end up in the final image
36
36
&& apk del --purge .build-rust
You can’t perform that action at this time.
0 commit comments