mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
✨ feat(server): Add pulseaudio to capture sound (#10)
## Description **What(what issue does this code solve/what feature does it add):** We do not have a way to capture sound inside the container. **How(how does it solve it):** 1. Install pulseaudio inside the container 2. Add an entrypoint.sh where we start the pulseaudio ## Required Checklist: - [ ] I have added any necessary documentation and comments in my code (where appropriate) - [ ] I have added tests to make sure my code runs in all contexts ## Further comments
This commit is contained in:
@@ -40,6 +40,7 @@ ENV XDG_RUNTIME_DIR=/run/user/1000/ \
|
||||
WAYLAND_DISPLAY=wayland-0 \
|
||||
PUID=0 \
|
||||
PGID=0 \
|
||||
HOME="/root" \
|
||||
UNAME="root"
|
||||
|
||||
RUN apt-get update -y \
|
||||
@@ -103,10 +104,19 @@ RUN apt-get update -y \
|
||||
gamescope \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY .scripts/ /usr/bin/netris/
|
||||
#Install pulseaudio
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
alsa-utils \
|
||||
libasound2 \
|
||||
libasound2-plugins \
|
||||
pulseaudio \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& echo "load-module module-native-protocol-tcp auth-anonymous=1" >> /etc/pulse/default.pa
|
||||
|
||||
COPY .scripts/ /usr/bin/netris/
|
||||
RUN ls -la /usr/bin/netris \
|
||||
&& chmod +x /usr/bin/netris/proton
|
||||
&& chmod +x /usr/bin/netris/proton /usr/bin/netris/entrypoint.sh
|
||||
|
||||
#Install proton
|
||||
RUN /usr/bin/netris/proton -i
|
||||
@@ -116,4 +126,4 @@ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
|
||||
RUN chmod +x /tini
|
||||
ENTRYPOINT ["/tini", "--"]
|
||||
|
||||
CMD [ "/bin/bash" ]
|
||||
CMD [ "/usr/bin/netris/entrypoint.sh" ]
|
||||
Reference in New Issue
Block a user