DEV Community

Discussion on: Use Multi-Stage Docker Builds For Statically-Linked Rust Binaries

Collapse
 
bretthancox profile image
bretthancox • Edited

Appreciate this article so much. So many concepts being added to my knowledge-base for future use.

One thing I find is that I'm managing container-container communications a lot. Not a problem normally. How is that with scratch? Does Docker handle it all, or does the OS provide some abstraction that would need to be substituted within the binary?

EDIT: To be clear, I'm thinking of putting a binary at the end of an API call. If I could do that with a minimal image I would be so much happier. Just want to get the plumbing right 😉

Thread Thread
 
deciduously profile image
Ben Lovy

I haven't tried yet, but my instinct tells me this is something Docker manages, not your containers. Like Moshe said, the Linux userland inside a container is explicitly for runtime needs of the container's internal commands, everything outside of that is handled by Docker itself.

Thread Thread
 
bretthancox profile image
bretthancox

Thanks. scratch feels like taking the training wheels off, but you have to do it at some point!

Thread Thread
 
qm3ster profile image
Mihail Malo

Afaik, scratch isn't "nothing", it just downloads nothing.
There's still stuff from the runtime when it's alive.