Docker Community Forums

Share and learn in the Docker community.

Docker for mac -- Audio support

Hello everyone,

You guys did an amazing tool, docker is great ! Thank you !

I am running docker for mac 1.12, and as I work a lot with voice recognition and sound softwares, I cannot find any informations about how to link OS X sound system to /dev/snd folder of the container running ubuntu for example.

To bypass this issue, I am running a vm linux on the side with docker on it but I am really missing docker’s point by that way…
I have search a LOT for this and tried different things. Apparently xhyve does not integrate audio but I cannot be sure due to the lack of documentation.

Do you know guys how to link OS X sound system to a container with --device for exemple ?

Thanks a lot

1 Like

I too am very interested in Docker For Mac audio support.

If anyone has info on this please do share.

Was this ever answered?

Hello guys,

Any thoughts about this?


I can’t believe this is not possible?

Why can’t anyone come up with a solution?

Still no solution for this?

In my macOS Mojave, I got the container’s test sound play from my speaker (on MacBook Pro, Early 2015) as below.

$ brew install pulseaudio
$ brew services start pulseaudio
$ docker run --rm -it \
    -e PULSE_SERVER=docker.for.mac.localhost \
    -v ~/.config/pulse:/home/pulseaudio/.config/pulse \
    --entrypoint speaker-test \
    jess/pulseaudio -c 2 -l 1 -t wav

Here’s the reference:

Here’s my env info.

$ # PulseAudio
$ brew list --versions | grep pulseaudio
pulseaudio 12.2

$ # OS info
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.14.5
BuildVersion:	18F132

$ # Docker info
$ docker version
Client: Docker Engine - Community
 Version:           18.09.2
 API version:       1.39
 Go version:        go1.10.8
 Git commit:        6247962
 Built:             Sun Feb 10 04:12:39 2019
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
  Version:          18.09.2
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.6
  Git commit:       6247962
  Built:            Sun Feb 10 04:13:06 2019
  OS/Arch:          linux/amd64
  Experimental:     false

$ # Brew
$ brew --version
Homebrew 2.1.8-11-g4354ca1
Homebrew/homebrew-core (git revision 0cf5; last commit 2019-07-26)
Homebrew/homebrew-cask (git revision a3c2e; last commit 2019-07-26)
$ brew doctor 
Your system is ready to brew.

$ # Hardware Info
$ system_profiler -detailLevel mini SPHardwareDataType

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro12,1
      Processor Name: Intel Core i5
      Processor Speed: 2.7 GHz
      Number of Processors: 1
      Total Number of Cores: 2
      L2 Cache (per Core): 256 KB
      L3 Cache: 3 MB
      Hyper-Threading Technology: Enabled
      Memory: 8 GB
      Boot ROM Version:
      SMC Version (system): 2.28f7