Skip to content

Commit 7397a5f

Browse files
committed
Fix sound to host via PulseAudio
1 parent a6802d6 commit 7397a5f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ENV VNC_PASSWD=123456
1111
ENV APT_INSTALL_PRE="apt -o Acquire::ForceIPv4=true update && DEBIAN_FRONTEND=noninteractive apt -o Acquire::ForceIPv4=true install -y --no-install-recommends"
1212
ENV APT_INSTALL_POST="&& apt clean -y && rm -rf /var/lib/apt/lists/*"
1313
# Make sure the dependencies are met
14-
RUN eval ${APT_INSTALL_PRE} tigervnc-standalone-server tigervnc-common tigervnc-tools fluxbox eterm xterm git net-tools python3 python3-numpy ca-certificates scrot ${APT_INSTALL_POST}
14+
RUN eval ${APT_INSTALL_PRE} tigervnc-standalone-server tigervnc-common tigervnc-tools fluxbox eterm xterm git net-tools python3 python3-numpy ca-certificates scrot pulseaudio-utils ${APT_INSTALL_POST}
1515

1616
# Install VNC. Requires net-tools, python and python-numpy
1717
RUN git clone --branch v1.4.0 --single-branch https://github.com/novnc/noVNC.git /opt/noVNC

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ To use your own VNC client, you just need:
2828

2929
Where port 5900 is exposing the VNC Server port.
3030

31+
## Sound
32+
To enable sound, you'll need to add `-v /run/user/$UID/pulse/native:/run/user/$UID/pulse/native --env PULSE_SERVER=unix:/run/user/$UID/pulse/native --user $(id -u)` to your argument list. This will expose the Pulse Audio server from your host to the container.
33+
3134
# Customization
3235
Containers that build on this will be able to have scripts run inside the Fluxbox window manager. Any custom scripts can be placed in /opt/startup_scripts.
3336

0 commit comments

Comments
 (0)