-
Notifications
You must be signed in to change notification settings - Fork 36
/
Dockerfile
131 lines (110 loc) · 3.61 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
FROM ubuntu:20.04 as ubuntu-base
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true
RUN apt-get -qqy update \
&& apt-get -qqy --no-install-recommends install \
sudo \
supervisor \
xvfb x11vnc novnc websockify \
&& apt-get autoclean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN cp /usr/share/novnc/vnc.html /usr/share/novnc/index.html
COPY scripts/* /opt/bin/
# Add Supervisor configuration file
COPY supervisord.conf /etc/supervisor/
# Relaxing permissions for other non-sudo environments
RUN mkdir -p /var/run/supervisor /var/log/supervisor \
&& chmod -R 777 /opt/bin/ /var/run/supervisor /var/log/supervisor /etc/passwd \
&& chgrp -R 0 /opt/bin/ /var/run/supervisor /var/log/supervisor \
&& chmod -R g=u /opt/bin/ /var/run/supervisor /var/log/supervisor
# Creating base directory for Xvfb
RUN mkdir -p /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix
CMD ["/opt/bin/entry_point.sh"]
#============================
# Utilities
#============================
FROM ubuntu-base as ubuntu-utilities
RUN apt-get update
RUN apt-get install ffmpeg -y
RUN apt-get -qqy update \
&& apt-get -qqy --no-install-recommends install \
firefox htop terminator gnupg2 software-properties-common \
&& wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& apt install -qqy --no-install-recommends ./google-chrome-stable_current_amd64.deb \
&& apt-add-repository ppa:remmina-ppa-team/remmina-next \
&& apt update \
&& apt install -qqy --no-install-recommends remmina remmina-plugin-rdp remmina-plugin-secret \
&& apt-add-repository ppa:obsproject/obs-studio \
&& apt update \
&& apt install -qqy --no-install-recommends obs-studio \
&& apt-get install -y --no-install-recommends \
dbus-x11 \
nautilus \
gedit \
expect \
sudo \
bash \
net-tools \
novnc \
xfce4 \
socat \
unzip \
x11vnc \
xvfb \
supervisor \
curl \
git \
wget \
g++ \
unzip \
ssh \
chromium-browser \
firefox \
terminator \
htop \
gnupg2 \
locales \
xfonts-intl-chinese \
fonts-wqy-microhei \
ibus-pinyin \
ibus \
ibus-clutter \
ibus-gtk \
ibus-gtk3 \
python3-pip \
python3-setuptools \
&& apt install unzip \
&& apt-get autoclean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN dpkg-reconfigure locales
RUN wget --no-check-certificate -c https://golang.org/dl/go1.16.3.linux-amd64.tar.gz
RUN tar -C /usr/local -xvzf go1.*.tar.gz
RUN export PATH=$PATH:/usr/local/go/bin
RUN git clone https://github.com/vlakhani28/bbht.git
RUN chmod +x bbht/install.sh
RUN ./bbht/install.sh
RUN mv bbht/run-after-go.sh /root/tools
RUN chmod +x /root/tools/run-after-go.sh
# COPY conf.d/* /etc/supervisor/conf.d/
#============================
# GUI
#============================
FROM ubuntu-utilities as ubuntu-ui
ENV SCREEN_WIDTH=1280 \
SCREEN_HEIGHT=720 \
SCREEN_DEPTH=24 \
SCREEN_DPI=96 \
DISPLAY=:99 \
DISPLAY_NUM=99 \
UI_COMMAND=/usr/bin/startxfce4
# RUN apt-get update -qqy \
# && apt-get -qqy install \
# xserver-xorg xserver-xorg-video-fbdev xinit pciutils xinput xfonts-100dpi xfonts-75dpi xfonts-scalable kde-plasma-desktop
RUN apt-get update -qqy \
&& apt-get -qqy install --no-install-recommends \
dbus-x11 xfce4 \
&& apt-get autoclean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*