# Docker mediasoup-worker error

**URL:** <https://mediasoup.discourse.group/t/docker-mediasoup-worker-error/3816>\
**Category:** Deployment & Scalability\
**Created:** [January 13, 2022, 5:16am UTC](https://mediasoup.discourse.group/t/docker-mediasoup-worker-error/3816 "2022-01-13T05:16:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandor-Hadas](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/sandor-hadas/32/1428_2.png) [@Sandor-Hadas](https://mediasoup.discourse.group/u/Sandor-Hadas)\
**Post date:** [January 13, 2022, 5:16am UTC](https://mediasoup.discourse.group/t/docker-mediasoup-worker-error/3816/1 "2022-01-13T05:16:38Z")

</div>

Hello There,

First question after reading quite a few comments on this topic. As far as I understand, the issue is that the pre-built binary expect a different O/S. How do you get this fixed, or should build be done in the docker continer?

Dockerfile looks partially like:  
FROM node:16  
RUN apt -y update  
RUN apt -y install python3-pip  
COPY . /opt/SFU  
RUN npm update  
RUN npm install .

Then run the container like:

> docker run -it --entrypoint /bin/bash 123456abcdef

> /opt/SFU/node\_modules/mediasoup\_prebuilt/worker/out/Release/mediasoup-worker  
> /opt/SFU/node\_modules/mediasoup\_prebuilt/worker/out/Release/mediasoup-worker: /lib/x86\_64-linux-gnu/libm.so.6: version `GLIBC\_2.29’ not found (required by /opt/SFU/node\_modules/mediasoup\_prebuilt/worker/out/Release/mediasoup-worker)

ldd also show this image. The host operating system on what Dockerimage is built is the same where I am running now - it is an ubuntu 20.04.  
So, how is it supposed to work “FROM node:” - or is it mandatory to make mediasoup working to have “FROM ubuntu:” in docker? Or, when using node as base, does mediasoup need a rebuild from source?

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/nazar-pc/32/369_2.png) [@nazar-pc](https://mediasoup.discourse.group/u/nazar-pc)\
**Post date:** [January 13, 2022, 5:24am UTC](https://mediasoup.discourse.group/t/docker-mediasoup-worker-error/3816/2 "2022-01-13T05:24:58Z")

</div>

Do you copy it into another container then (like one based on Alpine)?  
If so, don’t, you need to run on the same distro as it was compiled, executable isn’t fully static.  
Also make sure you don’t copy `node_modules` with `COPY` (add it to `.dockerignore` file).

---

<div class="post-metadata">

**Author:** ![Sandor-Hadas](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/sandor-hadas/32/1428_2.png) [@Sandor-Hadas](https://mediasoup.discourse.group/u/Sandor-Hadas)\
**Post date:** [January 13, 2022, 5:34am UTC](https://mediasoup.discourse.group/t/docker-mediasoup-worker-error/3816/3 "2022-01-13T05:34:59Z")

</div>

.dockerignore sounds like a good idea!

---

<div class="post-metadata">

**Author:** ![Sandor-Hadas](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/sandor-hadas/32/1428_2.png) [@Sandor-Hadas](https://mediasoup.discourse.group/u/Sandor-Hadas)\
**Post date:** [January 13, 2022, 5:43am UTC](https://mediasoup.discourse.group/t/docker-mediasoup-worker-error/3816/4 "2022-01-13T05:43:02Z")

</div>

Hmm, I added .dockerignore and the node\_modules directory does not exist when the docker container is started.  
npm install creates the directory and the same error is happening as before. The container is not copied anywhere.

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/nazar-pc/32/369_2.png) [@nazar-pc](https://mediasoup.discourse.group/u/nazar-pc)\
**Post date:** [January 13, 2022, 6:41am UTC](https://mediasoup.discourse.group/t/docker-mediasoup-worker-error/3816/5 "2022-01-13T06:41:26Z")

</div>

Ah, I remember something similar.

This is because you’re using container image with newer glibc on an old distro/Docker. Try to update your OS to the latest version and install latest Docker release and the issue should go away. You will get similar errors with other apps, it is not specific to mediasoup.

---

<div class="post-metadata">

**Author:** ![Sandor-Hadas](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/sandor-hadas/32/1428_2.png) [@Sandor-Hadas](https://mediasoup.discourse.group/u/Sandor-Hadas)\
**Post date:** [January 13, 2022, 6:58am UTC](https://mediasoup.discourse.group/t/docker-mediasoup-worker-error/3816/6 "2022-01-13T06:58:36Z")

</div>

You are right. FROM node:16 changed to FROM node:latest and it works like a charm.
