From de1d8a67a5477edd9b14f6deac770120900563af Mon Sep 17 00:00:00 2001 From: Andrey Arapov Date: Fri, 8 Apr 2016 17:02:43 +0200 Subject: [PATCH] pulseaudio and video are now properly functioning --- Dockerfile | 11 +++++++++++ docker-compose.yml | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7f82a45..202a5e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,6 +60,17 @@ RUN mkdir -p /opt/java/64 \ && update-alternatives --set javaws /opt/java/64/jre/bin/javaws \ && rm -f /tmp/jre-linux-x64.tar.gz +# For testing the audio +# docker-compose run --rm --entrypoint /bin/bash firefox +# aplay -L +# pactl list +# arecord -D pulse -f cd | aplay -D pulse -B 10000 - +# RUN apt-get update && apt-get install -y alsa-utils +# +# WebRTC online test for Microphone, Camera, Network, Connectivity and Throughput +# https://test.webrtc.org/ +# https://webaudiodemos.appspot.com/AudioRecorder/index.html + # -- Define a user under which the firefox will be running ENV USER user ENV UID 1000 diff --git a/docker-compose.yml b/docker-compose.yml index 84a6799..83139bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,6 +26,7 @@ services: - isolated devices: - /dev/dri + - /dev/video0 volumes: - /tmp/.X11-unix:/tmp/.X11-unix - /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines:/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines:ro @@ -35,11 +36,13 @@ services: - /etc/localtime:/etc/localtime:ro - /etc/machine-id:/etc/machine-id:ro - /run/user/1000/pulse:/run/user/1000/pulse + - /dev/shm:/dev/shm:ro # - /tmp/krb5cc_1000:/tmp/krb5cc_1000:ro # - $HOME/.mozilla:/home/firefox/.mozilla - data:/home/user/.mozilla - $HOME/Downloads:/home/user/Downloads environment: - DISPLAY: unix$DISPLAY + - DISPLAY=unix$DISPLAY + - PULSE_SERVER=unix:/run/user/1000/pulse/native depends_on: - preseed