Hacker News new | ask | show | jobs
by xeonmc 1331 days ago
It's still not clear to me, so can you bundle source code into your Dockerfile and just have compilation being part of the docker compose step?
1 comments

Great question! In the demo app we showed yesterday (source here - https://github.com/second-state/microservice-rust-mysql), the Dockerfile is leveraging a multi-stage build where the first stage builds the Wasm module and the second stage extracts the Wasm module into a "FROM scratch" image.

In Compose, the "server" service is running using the image that is produced by that build. It's then handed off to the new Wasm runtime, where the module is extracted and executed. Hope that helps! Feel free to follow up with more questions!