Selkies Checkpoint 3 - Potential Audio Support
All checks were successful
Build & Push Docker Image / build-and-publish (push) Successful in 52s

This commit is contained in:
2025-10-01 16:49:02 -04:00
parent 59fbcd9527
commit 3bf3388408

View File

@@ -11,8 +11,17 @@ ENV \
RUN apt-get update && apt-get install -y --no-install-recommends \
default-jre \
wget \
pulseaudio \
pulseaudio-utils \
alsa-utils \
libasound2-plugins \
libnotify-bin \
notification-daemon \
&& rm -rf /var/lib/apt/lists/*
# Ensure the abc user is in the audio group for sound support
RUN usermod -a -G audio abc
# Add RuneLite icon for Selkies interface
RUN curl -o \
/usr/share/selkies/www/icon.png \
@@ -39,10 +48,29 @@ RUN mkdir -p /etc/xdg/openbox && \
echo ' </applications>' >> /etc/xdg/openbox/rc.xml && \
echo '</openbox_config>' >> /etc/xdg/openbox/rc.xml
# Create startup script for RuneLite
# Configure PulseAudio for containerized environment
RUN echo 'default-server = unix:/run/pulse/native' > /etc/pulse/client.conf && \
echo 'autospawn = no' >> /etc/pulse/client.conf
# Configure ALSA to use PulseAudio
RUN echo 'pcm.!default { type pulse }' > /etc/asound.conf && \
echo 'ctl.!default { type pulse }' >> /etc/asound.conf
# Create startup script for RuneLite with improved PulseAudio
RUN mkdir -p /etc/cont-init.d && \
echo '#!/usr/bin/with-contenv bash' > /etc/cont-init.d/99-runelite && \
echo 'sudo -u abc DISPLAY=:1 /usr/local/bin/runelite &' >> /etc/cont-init.d/99-runelite && \
echo '# Setup PulseAudio environment' >> /etc/cont-init.d/99-runelite && \
echo 'export PULSE_RUNTIME_PATH="/run/pulse"' >> /etc/cont-init.d/99-runelite && \
echo 'export PULSE_STATE_PATH="/run/pulse"' >> /etc/cont-init.d/99-runelite && \
echo 'export PULSE_CLIENTCONFIG="/etc/pulse/client.conf"' >> /etc/cont-init.d/99-runelite && \
echo '# Ensure pulse directory exists' >> /etc/cont-init.d/99-runelite && \
echo 'mkdir -p /run/pulse' >> /etc/cont-init.d/99-runelite && \
echo 'chown abc:abc /run/pulse' >> /etc/cont-init.d/99-runelite && \
echo '# Start PulseAudio in system mode' >> /etc/cont-init.d/99-runelite && \
echo 'sudo -u abc XDG_RUNTIME_DIR=/run/pulse pulseaudio --system=false --disallow-exit --disallow-module-loading=false --daemonize=false --log-target=newfile:/tmp/pulseaudio.log --log-level=info &' >> /etc/cont-init.d/99-runelite && \
echo 'sleep 2' >> /etc/cont-init.d/99-runelite && \
echo '# Start RuneLite with audio environment' >> /etc/cont-init.d/99-runelite && \
echo 'sudo -u abc DISPLAY=:1 PULSE_RUNTIME_PATH="/run/pulse" /usr/local/bin/runelite &' >> /etc/cont-init.d/99-runelite && \
chmod +x /etc/cont-init.d/99-runelite
# Also create desktop autostart as backup