-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile
36 lines (23 loc) · 1.32 KB
/
Dockerfile
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
FROM alpine:3.13.5
ENV NOVNC_TAG="v1.3.0"
ENV WEBSOCKIFY_TAG="v0.10.0"
ENV VNC_SERVER "localhost:5900"
RUN apk --no-cache --update --upgrade add \
bash \
python3 \
python3-dev \
gfortran \
py-pip \
build-base \
procps \
git
RUN pip install --no-cache-dir numpy
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN git config --global advice.detachedHead false && \
git clone https://github.com/novnc/noVNC --branch ${NOVNC_TAG} /root/noVNC && \
git clone https://github.com/novnc/websockify --branch ${WEBSOCKIFY_TAG} /root/noVNC/utils/websockify
RUN cp /root/noVNC/vnc.html /root/noVNC/index.html
RUN sed -i "/wait ${proxy_pid}/i if [ -n \"\$AUTOCONNECT\" ]; then sed -i \"s/'autoconnect', false/'autoconnect', '\$AUTOCONNECT'/\" /root/noVNC/app/ui.js; fi" /root/noVNC/utils/novnc_proxy
RUN sed -i "/wait ${proxy_pid}/i if [ -n \"\$VNC_PASSWORD\" ]; then sed -i \"s/WebUtil.getConfigVar('password')/'\$VNC_PASSWORD'/\" /root/noVNC/app/ui.js; fi" /root/noVNC/utils/novnc_proxy
RUN sed -i "/wait ${proxy_pid}/i if [ -n \"\$VIEW_ONLY\" ]; then sed -i \"s/UI.rfb.viewOnly = UI.getSetting('view_only');/UI.rfb.viewOnly = \$VIEW_ONLY;/\" /root/noVNC/app/ui.js; fi" /root/noVNC/utils/novnc_proxy
ENTRYPOINT [ "bash", "-c", "/root/noVNC/utils/novnc_proxy --vnc ${VNC_SERVER}" ]