Remix.run Logo
OptionOfT 2 days ago

A Docker container can launch a single process or multiple processes [0] (please don't do this, use docker as the separation & health checker).

In the former case we have a single executable. We can now choose to statically compile all dependencies with musl.

We can also statically compile all the assets (HTML, images) into the binary.

Then you take your Docker image and build a FROM scratch image, copy in your binary and you've got a super-lightweight container.

[0] https://www.bugsink.com/blog/multi-process-docker-images/