-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-novnc
63 lines (53 loc) · 1.73 KB
/
Dockerfile-novnc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
ARG PLATFORM=debian
ARG OS=buster
FROM ${PLATFORM}:${OS}
# Setup demo environment variables
ENV HOME=/root \
DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
DISPLAY=:0.0 \
DISPLAY_WIDTH=1600 \
DISPLAY_HEIGHT=968
# Install git, supervisor, VNC, & X11 packages
RUN perl -p -i'.bak' -e "s| main| main contrib non-free|g" /etc/apt/sources.list && \
apt update && \
apt upgrade -y && \
apt install -y \
procps net-tool \
emacs-nox vim nano \
lsb-release \
bash \
fluxbox \
socat \
supervisor \
x11vnc \
xterm \
xvfb \
mesa-utils mesa-utils-extra && \
apt install -y nvidia-driver-libs && \
apt clean -y
# Clone noVNC from github
RUN apt install -y git \
&& git clone https://github.com/kanaka/noVNC.git /root/noVNC \
&& git clone https://github.com/kanaka/websockify /root/noVNC/utils/websockify \
&& rm -rf /root/noVNC/.git \
&& rm -rf /root/noVNC/utils/websockify/.git \
&& apt purge -y git
# Install vglrun?
RUN apt install -y wget && \
wget https://sourceforge.net/projects/virtualgl/files/2.5.2/virtualgl_2.5.2_amd64.deb/download -O /tmp/virtualgl_2.5.2_amd64.deb && \
dpkg -i /tmp/virtualgl_2.5.2_amd64.deb && \
rm /tmp/virtualgl_2.5.2_amd64.deb && \
apt purge -y wget
# Set X server : requires users are in vglusers group
RUN echo "1\nY\nY\nY\nn\n" > answer.txt && \
/opt/VirtualGL/bin/vglserver_config < answer.txt && \
rm answer.txt
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Modify the launch script 'ps -p'
RUN cat /root/noVNC/utils/launch.sh && \
sed -i -- "s/ps -p/ps -o pid | grep/g" /root/noVNC/utils/launch.sh
EXPOSE 8080
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]