So is there a secret to building docker containers? When I `cargo install` or `cargo build` inside a container I end up with an image of 2.5GB 😱

@kevin Cargo's cache for incremental compilation is HUGE. You may want to rm -rf it after you've got the build products you wanted. Or use Cargo's env vars to tell Cargo to store its stuff in some dir that isn't part of the image.


@kornel I figured as much, was shocked when I saw a 2.5GB container for literally a 1-file web server. :D

My problem was also that I want to use alpine linux but am not building for alpine yet because I've no idea how to configure my builds. Will need to do more research.

Β· Web Β· 0 Β· 0 Β· 0
Sign in to participate in the conversation
Mastodon is a instance for everyone who is part of bullgit. πŸŽ‰