mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
WIP.
This commit is contained in:
38
test/pulseaudio/Dockerfile
Normal file
38
test/pulseaudio/Dockerfile
Normal file
@ -0,0 +1,38 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
#
|
||||
# set custom user
|
||||
ARG USERNAME=neko
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=$USER_UID
|
||||
|
||||
#
|
||||
# install dependencies
|
||||
RUN set -eux; apt-get update; \
|
||||
apt-get install -y --no-install-recommends pulseaudio; \
|
||||
#
|
||||
# create a non-root user
|
||||
groupadd --gid $USER_GID $USERNAME; \
|
||||
useradd --uid $USER_UID --gid $USERNAME --shell /bin/bash --create-home $USERNAME; \
|
||||
#
|
||||
# make directories
|
||||
mkdir -p /home/$USERNAME/.config/pulse; \
|
||||
chown -R $USERNAME:$USERNAME /home/$USERNAME; \
|
||||
#
|
||||
# clean up
|
||||
apt-get clean -y; \
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||
|
||||
#
|
||||
# set default envs
|
||||
ENV USER=$USERNAME
|
||||
|
||||
#
|
||||
# copy configuation files
|
||||
COPY default.pa /etc/pulse/default.pa
|
||||
|
||||
USER $USERNAME
|
||||
|
||||
ENTRYPOINT [ "/usr/bin/pulseaudio" ]
|
||||
|
||||
CMD [ "--log-level=info", "--disallow-module-loading", "--disallow-exit", "--exit-idle-time=-1" ]
|
10
test/pulseaudio/default.pa
Normal file
10
test/pulseaudio/default.pa
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/pulseaudio -nF
|
||||
|
||||
### Create virtual output device sink
|
||||
load-module module-null-sink sink_name=audio_output sink_properties=device.description="Virtual\ Audio\ Output"
|
||||
|
||||
# Allow pulse audio to be accessed via TCP (from localhost only), to allow other users to access the virtual devices
|
||||
load-module module-native-protocol-tcp port=4713 auth-anonymous=1
|
||||
|
||||
### Make sure we always have a sink around, even if it is a null sink.
|
||||
load-module module-always-sink
|
Reference in New Issue
Block a user