Hello !
Mix release with NIF in a containser crashes … I can’t find why.
If I run the project locally (mix phx.serve) it works.
When I build a release locally and run it, it works.
When I copy the locally generated release directory in a Docker container and spin it up, it works.
When I build everything in a Docker container (mix release), it fails with the following error:
=INFO REPORT==== 13-May-2026::10:16:55.060537 ===
application: kernel
exited: {{shutdown,
{failed_to_start_child,on_load,
{on_load_function_failed,'Elixir.MSeed.NIF',
{error,
{bad_lib,
"Failed to find library init function: '/app/wsdataselect/lib/wsdataselect-1.1.18/priv/libexmseed.so: undefined symbol: _nif_init'"}}}}},
{kernel,start,[normal,[]]}}
type: permanent
Kernel pid terminated (application_controller) ("{application_start_failure,kernel,{{shutdown,{failed_to_start_child,on_load,{on_load_function_failed,'Elixir.MSeed.NIF',{error,{bad_lib,\"Failed to find library init function: '/app/wsdataselect/lib/wsdataselect-1.1.18/priv/libexmseed.so: undefined symbol: _nif_init'\"}}}}},{kernel,start,[normal,[]]}}}")
ldd on the /app/wsdataselect/lib/wsdataselect-1.1.18/priv/libexmseed.so says everything is statically linked.
Dockerfile Dockerfile · 65-libmseed-nif · OSUG / RESIF / wsdataselect · GitLab
Anybody has an idea what is missing in the container ?






















