-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile
70 lines (58 loc) · 1.83 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
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
FROM ubuntu:18.04
ENV BAIDUNETDISK_PACKAGE https://issuepcdn.baidupcs.com/issue/netdisk/LinuxGuanjia/4.3.0/baidunetdisk_4.3.0_amd64.deb
ENV NOVNC_PACKAGE https://github.com/novnc/noVNC/archive/refs/tags/v1.3.0.tar.gz
ENV VNC_SERVER_PASSWD password
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
ENV LANGUAGE zh_CN:zh
# Variables needed for non interactive tzdata installation.
ENV TZ=Asia/Shanghai
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get -qqy update && \
apt-get -qqy install \
supervisor \
wget \
x11vnc \
xvfb \
websockify \
i3status \
i3-wm \
desktop-file-utils \
libappindicator3-1 \
libasound2 \
libnss3 \
libgtk-3-0 \
libfontconfig \
libfreetype6 \
libgbm-dev \
libnotify4 \
libsecret-1-0 \
xfonts-cyrillic \
xfonts-scalable \
fonts-liberation \
fonts-ipafont-gothic \
fonts-wqy-zenhei \
xdg-utils && \
rm -rf /var/lib/apt/lists/* && \
apt-get -qyy clean
RUN mkdir /root/.vnc && \
touch /root/.vnc/passwd
RUN wget ${BAIDUNETDISK_PACKAGE} -O baidunetdisk.deb && \
dpkg -i baidunetdisk.deb && \
rm baidunetdisk.deb -f
# Download and extract noVNC, then remove the version number in directory name.
RUN wget ${NOVNC_PACKAGE} -O novnc.tar.gz && \
mkdir -p /root/novnc && \
tar -xzf novnc.tar.gz -C /root/novnc && \
rm novnc.tar.gz websockify.tar.gz -f && \
mv /root/novnc/noVNC-* /root/novnc/noVNC
# Remove cap_net_admin capabilities to avoid failing with 'operation not permitted'.
RUN setcap -r `which i3status`
COPY supervisord.conf /root/supervisord.conf
COPY i3_config /root/.config/i3/config
EXPOSE 5900
EXPOSE 6080
CMD echo "VNC (vnc://localhost:5900) password is $VNC_SERVER_PASSWD" && \
/usr/bin/x11vnc -storepasswd $VNC_SERVER_PASSWD ~/.vnc/passwd && \
/usr/bin/supervisord -c /root/supervisord.conf && \
/usr/bin/tail -f /dev/null