How do I configure pulseaudio to work with containers?
I was able to run firefox and vlc in a container on kubuntu 15.10 without an issue, but I haven’t been able to get it to work in tumbleweed.
I’ve tried creating the image with alpine, opensuse (with packman), and most recently went back to ubuntu
FROM ubuntu:16.04
RUN echo 'deb http://archive.ubuntu.com/ubuntu/ xenial multiverse' >> /etc/apt/sources.list && \
echo 'deb-src http://archive.ubuntu.com/ubuntu/ xenial multiverse' >> /etc/apt/sources.list
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
vlc \
vlc-plugin-* \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd -g 1000 user \
&& useradd --create-home -d /home/user -g user -u 1000 user \
&& usermod -a -G audio,video user
USER user
WORKDIR /home/user
ENTRYPOINT "vlc"]
I’m running the image with the following command
docker run -d \
-v /etc/localtime:/etc/localtime:ro \
--device /dev/snd \
--device /dev/dri \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=unix$DISPLAY \
--name vlc \
rdesfo/vlc
I’m getting the following error
vlc
[0000000000e0c238] pulse audio output error: PulseAudio server connection failure: Connection refused
[0000000000e13768] dbus interface error: Failed to connect to the D-Bus session daemon: /usr/bin/dbus-launch terminated abnormally without any error message
[0000000000e13768] core interface error: no suitable interface module
[0000000000d39178] core libvlc error: interface "dbus,none" initialization failed
[0000000000d39178] core libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: i965
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4771:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default
[0000000000e0c238] alsa audio output error: cannot open ALSA device "default": No such file or directory
[0000000000e0c238] core audio output error: module not functional
[00007fd7b402e9c8] core decoder error: failed to create audio output
[00007fd798001ed8] dbus_screensaver inhibit error: cannot connect to session bus: /usr/bin/dbus-launch terminated abnormally without any error message
[00007fd798001268] xcb vout display error: shared memory server-side error: X11 error 10
[00007fd798001268] xcb vout display error: same error on retry: X11 error 10
[00007fd798001268] xcb_xv vout display: using buggy X11 server - SSH proxying?
[00007fd798001268] xcb vout display error: shared memory server-side error: X11 error 10
[00007fd798001268] xcb vout display error: same error on retry: X11 error 10
[00007fd798001268] xcb_xv vout display: using buggy X11 server - SSH proxying?
[00007fd798001268] xcb vout display error: shared memory server-side error: X11 error 10
[00007fd798001268] xcb vout display error: same error on retry: X11 error 10
[00007fd798001268] xcb_xv vout display: using buggy X11 server - SSH proxying?
QObject::~QObject: Timers cannot be stopped from another thread