-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-novnc-debian
93 lines (81 loc) · 2.81 KB
/
Dockerfile-novnc-debian
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
ARG PLATFORM=debian
ARG OS=buster
FROM ${PLATFORM}:${OS}
ARG GRAPHICS=nvidia
# 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 apt update && \
apt upgrade -y && \
apt install -y \
procps net-tools \
wget curl \
emacs-nox vim nano \
lsb-release \
bash \
fluxbox \
git \
socat \
supervisor \
x11vnc \
xterm \
xvfb \
mesa-utils mesa-utils-extra && \
apt clean -y
# # Clone noVNC from github
# RUN apt update && \
# apt install -y novnc
RUN 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
# add Graphics driver for better perf
RUN apt install -y lshw && \
lshw -c video | grep configuration | grep configuration | awk '{print $2}' | perl -pe 's|driver=||' && \
if [ x$GRAPHICS != xnone ]; then \
if [ x$PLATFORM = xubuntu ]; then \
apt-get install -y module-init-tools; \
fi ; \
if [ x$PLATFORM = xdebian ]; then \
apt-get install -y kmod; \
fi ; \
fi && \
if [ x$GRAPHICS = xnvidia ]; then \
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/384.98/NVIDIA-Linux-x86_64-384.98.run -O /tmp/NVIDIA-DRIVER.run; \
sh /tmp/NVIDIA-DRIVER.run -a -N --ui=none --no-kernel-module; \
rm /tmp/NVIDIA-DRIVER.run; \
fi && \
if [ x$GRAPHICS = xintelhd ]; then \
echo "should install intelhd driver"; \
fi && \
if [ x$GRAPHICS = xati ]; then \
echo "should install ati driver"; \
fi && \
if [ x$GRAPHICS = xradeon ]; then \
echo "should install xradeon driver"; \
fi
RUN 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
# NB Mounted licenses key
RUN cd /tmp && \
apt-get install -y \
tcsh libcurl3 libglu1-mesa libxmu6 libxv1 libssh2-1 libglib2.0-0 && \
wget http://archives.ensight.com/EnSight102/10.2.3a/Full/EnSight102Full-10.2.3a_amd64.deb && \
dpkg -i EnSight102Full-10.2.3a_amd64.deb && \
mkdir -p /opt/licenses && \
ln -sf /opt/licenses/slim8.key /opt/CEI/license8 && \
rm /tmp/EnSight102Full-10.2.3a_amd64.deb
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Modify the launch script 'ps -p'
RUN 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"]