# mediasoup in a docker image running alpine:latest is problematic

**URL:** <https://mediasoup.discourse.group/t/mediasoup-in-a-docker-image-running-alpine-latest-is-problematic/4302>\
**Category:** Deployment & Scalability\
**Created:** [June 20, 2022, 7:14am UTC](https://mediasoup.discourse.group/t/mediasoup-in-a-docker-image-running-alpine-latest-is-problematic/4302 "2022-06-20T07:14:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rucio](https://avatars.discourse-cdn.com/v4/letter/r/779978/32.png) [@Rucio](https://mediasoup.discourse.group/u/Rucio)\
**Post date:** [June 20, 2022, 7:14am UTC](https://mediasoup.discourse.group/t/mediasoup-in-a-docker-image-running-alpine-latest-is-problematic/4302/1 "2022-06-20T07:14:15Z")

</div>

Greetings,

Just a heads up before anyone spends hours upon hours troubleshooting this. The TL;DR - mediasoup under an alpine:latest (v3.16 at the time of this post) is problematic, save yourself the trouble an build your container using ubuntu/debian.

My application was working just fine and I decided to containerize it to make it a bit more portable. I built the docker container exactly how it should have been built, but I decided to use alpine:latest due to the incredibly small size of the containers (I use alpine for nearly everything including the mediasoup signaling).

However, I immediately started experiencing trouble which did not occur when I was not containerized. I assumed this was network related due to the symptoms, but I discovered after some troubleshooting that it was related entirely to the use of an alpine docker image.

Here are the symptoms -

mediasoup workers run per usual but odd stream issues will start surfacing after a very short while. Streams seem to no longer isolated from interfering with other streams, for example if a new consume attempts to consume from an existing producer that other consumers are listening to, those other consumers will temporarily lose their streams which will eventually start up again. Closing a consumer/transport will also cause other consumers to experience a temporary loss until the stream recovers.

Simply shifting your docker container over to ubuntu:latest (at the time of this post that is 22.04) allows mediasoup to work flawlessly. I haven’t tested with any other images, but I assume any full traditional container w/ GNU libc would probably work and containers which use musl libc may be problematic.

If you have insight as to why mediasoup has issues with alpine / alpine:latest under docker (possibly outside of docker too?), feel free to share.

Thanks!  
Rucio

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [June 20, 2022, 11:00am UTC](https://mediasoup.discourse.group/t/mediasoup-in-a-docker-image-running-alpine-latest-is-problematic/4302/2 "2022-06-20T11:00:02Z")

</div>

This is not the first issue I’ve heard about related to alphine Linux Docker images but this is the weirdest one…
