50 lines
1.5 KiB
Docker
50 lines
1.5 KiB
Docker
# Inspired by https://github.com/vexingcodes/dwarf-fortress-docker
|
|
|
|
|
|
FROM theasp/novnc:latest
|
|
|
|
RUN apt-get update --allow-releaseinfo-change \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
|
|
gstreamer1.0-plugins-good \
|
|
gstreamer1.0-pulseaudio \
|
|
gstreamer1.0-tools \
|
|
\
|
|
libglu1-mesa \
|
|
libgtk2.0-0 \
|
|
libncursesw5 \
|
|
libopenal1 \
|
|
libsdl-image1.2 \
|
|
libsdl-ttf2.0-0 \
|
|
libsdl1.2debian \
|
|
\
|
|
libsndfile1 \
|
|
pulseaudio \
|
|
ucspi-tcp \
|
|
dbus-x11 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY conf.d /app/conf.d2
|
|
RUN mv /app/conf.d2/* /app/conf.d
|
|
|
|
COPY tokenfile /app/tokenfile
|
|
|
|
COPY default.pa client.conf /etc/pulse/
|
|
COPY webaudio.js /usr/share/novnc/core/
|
|
RUN ln -s /usr/share/novnc/vnc_lite.html /usr/share/novnc/index.html \
|
|
&& sed -i 's/display:flex/display:none/' /usr/share/novnc/app/styles/lite.css \
|
|
&& sed -i "/import RFB/a \
|
|
import WebAudio from './core/webaudio.js'" \
|
|
/usr/share/novnc/vnc_lite.html \
|
|
&& sed -i "/function connected(e)/a \
|
|
var wa = new WebAudio(null); \
|
|
document.getElementsByTagName('canvas')[0].addEventListener('keydown', e => { wa.start(); });" \
|
|
/usr/share/novnc/vnc_lite.html \
|
|
&& sed -i "s/'path', 'websockify');/'path', 'websockify?token=vnc');/" \
|
|
/usr/share/novnc/vnc_lite.html
|
|
|
|
RUN groupadd pa \
|
|
&& useradd --create-home --gid pa pa \
|
|
&& mkdir -p /tmp/psock \
|
|
&& chown -R pa:pa /tmp/psock
|
|
|
|
VOLUME /tmp/psock |