- 
                Notifications
    
You must be signed in to change notification settings  - Fork 94
 
Description
It has become quite clear that there is high demand for running Rover on Alpine in production images due to Alpine's lightweight nature. Unfortunately with the introduction of rover supergraph compose, we stopped building fully static binaries for Linux since, well, rusty_v8 does not have prebuilt binaries for x86_64-unknown-linux-musl.
We want you to be able to use Rover in your Alpine images, but the constraints have forced our hand to a less-than-perfect solution. We've decided on first steps, but discussion is open on future steps!
First steps
Our first step will be to build binaries for x86_64-unknown-linux-musl that do not include rover supergraph compose.
This includes the following work:
-  Create a cargo feature for 
rover supergraph compose.
If the feature is not enabled, runningrover supergraph composeshould error with:$ rover supergraph compose --config ./supergraph.yml error: You cannot run `rover supergraph compose` with this binary. You will need to install Rover on a machine that includes `glibc >= vX.X`
 -  Add a step to our release GitHub action to build for 
x86_64-unknown-linux-muslwith that feature disabled -  Update the curl installer to install the musl build if 
glibcdoes not exist -  Update the npm installer to install the musl build if 
glibcdoes not exist 
Possible future steps
- Bundle the JavaScript file that does composition with the 
muslbuild, and shell out tonodedirectly to run composition - Create a cloud function that executes composition and use that with the 
muslbuild - Wait for 
rusty_v8to build binaries formusl - Write a composition function in pure Rust
 
A PR for first steps will come shortly, but it won't close this issue until we decide on possible future steps. If and when that future is decided, we will create a new issue and close this one.