rust-lang / docker-rust

The official Docker images for Rust
438 stars 88 forks source link

Remove $RUSTUP_HOME/share in Docker images #164

Closed notgull closed 10 months ago

notgull commented 10 months ago

The rust:1.74-debian Docker image is around 1.5 GB. Around 500MB of that is the documentation stored in $RUSTUP_HOME/share. I would wager that nearly all users of this Docker image do not use this documentation.

Therefore, in order to save space, it would be nice if this documentation was removed.

saethlin commented 10 months ago

I'm surprised the images don't already use the profile minimal, it exists for this purpose.

notgull commented 10 months ago

It seems like they do, but there's still around 500MB of docs for some reason.

saethlin commented 10 months ago

Are you referring to this?

root@212fb5a0e602:/usr/local/rustup/toolchains/1.74.0-x86_64-unknown-linux-gnu# du -h share
96K share/doc/cargo
56K share/doc/rust
156K    share/doc
452K    share/man/man1
456K    share/man
28K share/zsh/site-functions
32K share/zsh
648K    share

This is the only share I can find in the images.

notgull commented 10 months ago

Ah yes, I misread it as MB in my tests. Nevermind!