User:Maffblaster/Drafts/Skinny Gentoo

This article Article description::tracks various techniques for making Gentoo consume less disk space (shrinking the size of the Gentoo base installation). This is useful when trying to trim the size of Gentoo down

Limit installed packages
In order to prevent bloat, the system should contain the lowest number of packages possible. This image will be on a strict diet so that it can stay skinny.

Bare minimums may change based on the purpose of the image. Containers do not need to contain a kernel, whereas a kernel is a necessary part of virtual machine images.

Container images
No kernel necessary, which will reduce space requirements significantly.

kernel .config
Kernel configuration should be kept to the lower possible numbers of features... perhaps review the Gentoo profile structure.

make.conf
can be adjusted to remove unnecessary files.

Then recompile the @world set.

Replacing coreutils with a single binary implementation
Many of the functional core utilities in Gentoo can be replaced with a smaller, single binary implementation such as  or.

Most of the files in should be symlinks.

Changing out the C lib
Use instead. This is possible by selecting the default/linux/amd64/17.0/musl profile.

Removing transient cache files
The following directories are ethereal / transient and can be removed before shipping an image:, ,