This commit is contained in:
xfnw 2021-05-25 20:30:17 -04:00
parent 930c8f546c
commit 9b168d4235
2 changed files with 12 additions and 9 deletions

View file

@ -1,16 +1,17 @@
FROM alpine:latest FROM alpine:latest
RUN apk add dbus xorg-server xf86-input-libinput eudev xspice supervisor firefox pulseaudio pulseaudio-alsa alsa-plugins-pulse\ RUN apk add dbus-x11 xorg-server xf86-input-libinput eudev xspice supervisor firefox pulseaudio pulseaudio-alsa alsa-plugins-pulse\
&& addgroup bnuuy \ && addgroup bnuuy \
&& adduser -G bnuuy -s /bin/sh -D bnuuy \ && adduser -G bnuuy -s /bin/sh -D bnuuy \
&& rm -rf /apk /tmp/* /var/cache/apk/* && rm -rf /apk /tmp/* /var/cache/apk/*
ADD etc /etc ADD etc /etc
RUN mkdir /tmp/audio_fifo\ RUN mkdir /tmp/audio_fifo\
&& echo "default-sink = fifo_output" >> /etc/pulse/client.conf \ && echo "default-sink = fifo_output" >> /etc/pulse/client.conf \
&& echo "load-module module-null-sink" >> /etc/pulse/default.pa \
&& echo "load-module module-always-sink" >> /etc/pulse/default.pa \
&& echo "load-module module-x11-publish" >> /etc/pulse/default.pa \ && echo "load-module module-x11-publish" >> /etc/pulse/default.pa \
&& echo "load-module module-pipe-sink sink_name=fifo_output file=/tmp/audio_fifo/audio.fifo format=s16 rate=48000 channels=2" >> /etc/pulse/default.pa && echo "load-module module-pipe-sink sink_name=fifo_output file=/tmp/audio_fifo/audio.fifo format=s16 rate=48000 channels=2" >> /etc/pulse/default.pa
WORKDIR /home/bnuuy WORKDIR /home/bnuuy
ADD mozilla .mozilla/ ADD mozilla .mozilla/
RUN chown -R bnuuy:bnuuy .mozilla/ RUN chown -R bnuuy:bnuuy .mozilla/ /tmp/audio_fifo
EXPOSE 5900 EXPOSE 5900
USER bnuuy
CMD ["/usr/bin/supervisord","-c","/etc/supervisord.conf"] CMD ["/usr/bin/supervisord","-c","/etc/supervisord.conf"]

View file

@ -1,11 +1,6 @@
[supervisord] [supervisord]
nodaemon=true nodaemon=true
[program:dbus]
command=/usr/bin/dbus-daemon --session
user=bnuuy user=bnuuy
autorestart=true
priority=100
[program:xspice] [program:xspice]
command=/usr/bin/Xspice --port 5900 --audio-fifo-dir=/tmp/audio_fifo --disable-ticketing :1 command=/usr/bin/Xspice --port 5900 --audio-fifo-dir=/tmp/audio_fifo --disable-ticketing :1
@ -13,9 +8,16 @@ user=bnuuy
autorestart=true autorestart=true
priority=200 priority=200
[program:pulse]
environment=HOME="/home/bnuuy",DISPLAY=":1",USER="bnuuy"
command=/usr/bin/pulseaudio
user=bnuuy
autorestart=true
priority=300
[program:firefox] [program:firefox]
environment=HOME="/home/bnuuy",DISPLAY=":1",USER="bnuuy" environment=HOME="/home/bnuuy",DISPLAY=":1",USER="bnuuy"
command=/usr/bin/firefox -width 1366 -height 768 command=/usr/bin/firefox -width 1366 -height 768
user=bnuuy user=bnuuy
autorestart=true autorestart=true
priority=300 priority=400