Docker Community Forums

Share and learn in the Docker community.

Unable to get sound from Linux docker image in Windows 10

App Version: Docker Community Edition 2.0.0.3

Hi,

I have created an image based on Ubuntu from my Linux Mint desktop. This image executes a program written in Python and part of the output includes playing some sounds.

In order to run the program properly within Linux I execute the following the line:

docker run -it --device /dev/snd ....

However, when I run in this image within Windows I get an error message stating that a sound device cannot be found.

This would be right as there is no such thing as /dev/snd within Windows. Would anyone have an idea as to what sound device I would use in this case?

Many thanks,

gmax4509

Docker on Windows runs inside a Linux VM in Hyper-V. Seems it’s not possible to add a sound device to such a VM.

You can trick it by using RDP. :smiley:

JPC has a good walkthrough on the topic.
http://sqlblog.com/blogs/john_paul_cook/archive/2009/09/14/enabling-sound-on-hyper-v.aspx

Or you could go Windows Native Container instead.