That's an interesting point that I hadn't considered, but the usual use case is to have a Dockerfile that depends on a minimal Rust image, build your software in that, and then deploy it.
The flow we use for Go (since we dont use Rust in prod... yet) is one image to build the binary and then we place it in another for deployment. Its kinda silly to have compilers in production images.
That makes sense. I'm using Rust in prod for periodic data processing tasks that are started externally and run on the build server anyway, so I didn't bother pruning the image. It also has some non-Rust dependencies so it's based on ubuntu.
3
u/[deleted] May 27 '16
That's an interesting point that I hadn't considered, but the usual use case is to have a Dockerfile that depends on a minimal Rust image, build your software in that, and then deploy it.