diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..e994c52 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +Sound in Container: https://github.com/mviereck/x11docker/wiki/Container-sound:-ALSA-or-Pulseaudio + +Create socket: + +``` +pactl load-module module-native-protocol-unix socket=/tmp/pulseaudio.socket +``` + + +create `/tmp/pulseaudio.client.conf` with: + +``` +default-server = unix:/tmp/pulseaudio.socket +# Prevent a server running in the container +autospawn = no +daemon-binary = /bin/true +# Prevent the use of shared memory +enable-shm = false +``` + +Share pulse stuff + +``` +docker run --rm \ + --env PULSE_SERVER=unix:/tmp/pulseaudio.socket \ + --env PULSE_COOKIE=/tmp/pulseaudio.cookie \ + --volume /tmp/pulseaudio.socket:/tmp/pulseaudio.socket \ + --volume /tmp/pulseaudio.client.conf:/etc/pulse/client.conf \ + --user $(id -u):$(id -g) \ + imagename +``` |