Docker image with membrane_webrtc_plugin
Hi! I have some issues with running a Phoenix app in a Debian-based docker. Whereas it can be built, when I am running it, it crashes:
I am using Debian bullseye-20250407-slim
and I am installing the following dependencies for the runner machine:
3 Replies
I figured out some additional information. It has nothing to do with Docker. When I am running server with
mix phx.server
it works fine. It only crashes after it is built into a release (which is essentially what Docker does).Hi!
It seems that there is some sort of problem with the native (written in C) part of VPx decoder. By default pluigins with native dependencies pull the precompiled builds of the dependencies. This behavior can be disabled in config and that's what I would suggest you do:
or if you don't want to fetch any precompiled dependencies:
This will ensure that a precompiled build of
libvpx
will not be fetched and the compiler will use the one you have installed locally.Hi! I tried this but I am still getting similar error, but with
Elixir.Membrane.VPx.Encoder.Native.Nif
. Basically, I added "apt-get install -y pkg-config libssl-dev libvpx-dev" to dependencies included in phoenix-generated Dockerfile.
well, I can see that sometimes it is decoder and sometimes - encoder. I followed the first option, only disabling :membrane_vpx_plugin
ok, now I see that I needed to add vpx-tools
to the runner image. It is solved, but now the other component failed. I will try to eliminate them one by one 🙂