adoptoposs / mjml_nif

Elixir NIF bindings for the MJML Rust implementation (mrml)
https://hexdocs.pm/mjml
MIT License
122 stars 17 forks source link

Question: Issues to run in docker? #147

Closed bumbus closed 3 months ago

bumbus commented 3 months ago

Hi there, i got issues to run it in phoenix release generated docker files, for example: hexpm/elixir:1.16.2-erlang-25.2.3-debian-bullseye-20240423-slim

I already tried different Debian linux and elixir / otp versions, but the error remains the same: The app mostly crashes with:

 exited: {{shutdown,
                 {failed_to_start_child,kernel_safe_sup,
                     {on_load_function_failed,'Elixir.Mjml.Native',
                         {error,
                             {load_failed,
                                 "Failed to load NIF library: '/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/lib/mjml-3.1.0/priv/native/libmjml_nif-v3.1.0-nif-2.16-x86_64-unknown-linux-gnu.so)'"}}}}},

Any suggestions to fix this, please?

paulgoetze commented 3 months ago

Hey @bumbus, thanks for opening this issue.

The failure is because the docker image you used - based on Debian Bullseye - ships with an older glibc version.

If possible, you can try using a docker image of your choice which is based on a more recent Debian version, (i.e. v12 "Bookworm").

Please see https://hub.docker.com/r/hexpm/elixir/tags?name=bookworm for different OTP/Elixir version combinations.

Also note, that Debian Bullseye has end of security support in June 2024, so maybe you might want to migrate to a newer version anyways.

bumbus commented 3 months ago

Hi @paulgoetze, yes, I was bale to update to bookworm, and now it works well, thank you for this hint. Also the advice about end of security support was helpful. Thank you and have a nice one!