Skip to content

Conversation

@Muscraft
Copy link
Member

@Muscraft Muscraft commented Oct 3, 2025

While looking at some of docker-library's Dockerfiles, I realized that our current Dockerfile format could be improved, and we should try to roughly match theirs. This PR is a collection of changes that hopefully make things better.

References:

cc @Kobzol, @sfackler

Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through the commits, everything looked reasonable. Left one question.

rm rustup-init; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Dockerfile-slim, you remove wget, here you remove.. everything? Or what does apt-get purge without an argument do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mistaken about what this change did, and am going to drop it in favor of getting the other changes in.

I had hoped that apt-get purge -y --auto-remove wget would remove wget, anything unnecessary, as well as package metadata, but it appears it doesn't.

@Muscraft Muscraft merged commit 48cd7ec into rust-lang:master Oct 14, 2025
18 checks passed
@Muscraft Muscraft deleted the image-cleanup branch October 14, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants