2016-03-23 20:42:58 +00:00
|
|
|
# Run pulseaudio server in a container
|
|
|
|
#
|
|
|
|
# TODO
|
|
|
|
# - reset volume to 80% and keep it enabled when the container runs
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM debian:jessie
|
|
|
|
MAINTAINER Andrey Arapov <andrey.arapov@nixaid.com>
|
|
|
|
# Inspired by Jessica Frazelle <jess@docker.com>
|
|
|
|
|
|
|
|
# To avoid problems with Dialog and curses wizards
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
|
|
# Define a user under which the pulseaudio server will be running
|
2018-06-18 19:54:29 +00:00
|
|
|
ENV USER=user \
|
|
|
|
UID=1000 \
|
|
|
|
GROUPS=audio \
|
|
|
|
HOME=/home/user
|
2016-03-23 20:42:58 +00:00
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -yq pulseaudio pulseaudio-module-x11 \
|
|
|
|
&& rm -rf /var/lib/apt/lists
|
|
|
|
|
|
|
|
COPY [ "default.pa", "client.conf", "daemon.conf", "/etc/pulse/" ]
|
|
|
|
|
|
|
|
RUN useradd -u $UID -m -d $HOME -s /usr/sbin/nologin $USER \
|
|
|
|
&& usermod -aG $GROUPS $USER \
|
|
|
|
&& chmod 0644 -- /etc/pulse/* \
|
|
|
|
&& mkdir -p $HOME/.config/pulse \
|
|
|
|
&& chown -Rh $USER:$USER -- $HOME
|
|
|
|
|
|
|
|
WORKDIR $HOME
|
|
|
|
USER $USER
|
|
|
|
VOLUME [ "/tmp", "$HOME/.config/pulse" ]
|
|
|
|
ENTRYPOINT [ "/usr/bin/pulseaudio" ]
|