-
-
Notifications
You must be signed in to change notification settings - Fork 721
/
Dockerfile.beta
158 lines (152 loc) · 5.76 KB
/
Dockerfile.beta
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#FROM ubuntu:20.04
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
RUN cd /root && \
sed -i 's/^#\s*\(deb.*partner\)$/\1/g' /etc/apt/sources.list && \
sed -i 's/^#\s*\(deb.*restricted\)$/\1/g' /etc/apt/sources.list && \
apt-get update -y && \
apt-get install -yqq locales && \
apt-get install -yqq \
mate-desktop-environment-core \
mate-themes \
mate-accessibility-profiles \
mate-applet-appmenu \
mate-applet-brisk-menu \
mate-applets \
mate-applets-common \
mate-calc \
mate-calc-common \
mate-dock-applet \
mate-hud \
mate-indicator-applet \
mate-indicator-applet-common \
mate-menu \
mate-notification-daemon \
mate-notification-daemon-common \
mate-utils \
mate-utils-common \
mate-window-applets-common \
mate-window-buttons-applet \
mate-window-menu-applet \
mate-window-title-applet \
ubuntu-mate-icon-themes \
ubuntu-mate-themes \
tightvncserver \
pulseaudio && \
apt-get install --no-install-recommends -yqq \
supervisor \
sudo \
tzdata \
vim \
mc \
ca-certificates \
xterm \
curl \
wget \
wmctrl \
epiphany-browser && \
ln -fs /usr/share/zoneinfo/UTC /etc/localtime && dpkg-reconfigure -f noninteractive tzdata && \
apt-get -y install \
git \
libxfont-dev \
xserver-xorg-core \
libx11-dev \
libxfixes-dev \
libssl-dev \
libpam0g-dev \
libtool \
libjpeg-dev \
flex \
bison \
gettext \
autoconf \
libxml-parser-perl \
libfuse-dev \
xsltproc \
libxrandr-dev \
python3-libxml2 \
nasm \
xserver-xorg-dev \
fuse \
build-essential \
pkg-config \
libpulse-dev m4 intltool dpkg-dev \
libfdk-aac-dev \
libopus-dev \
libmp3lame-dev && \
apt-get update && apt build-dep pulseaudio -y && \
cd /tmp && apt source pulseaudio && \
pulseaudio --version && \
pulsever=$(pulseaudio --version | awk '{print $2}') && cd /tmp/pulseaudio-$pulsever && ./configure && \
git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git && cd pulseaudio-module-xrdp && ./bootstrap && ./configure PULSE_DIR="/tmp/pulseaudio-$pulsever" && make -j$(nproc) && \
cd /tmp/pulseaudio-$pulsever/pulseaudio-module-xrdp/src/.libs && install -t "/var/lib/xrdp-pulseaudio-installer" -D -m 644 *.so && \
cd /root && \
#git clone -b master https://github.com/neutrinolabs/xrdp.git && \
#git clone -b master https://github.com/neutrinolabs/xorgxrdp.git && \
git clone -b devel https://github.com/neutrinolabs/xrdp.git && \
git clone -b devel https://github.com/neutrinolabs/xorgxrdp.git && \
cd /root/xrdp && ./bootstrap && ./configure --enable-fuse --enable-jpeg --enable-vsock --enable-fdkaac --enable-opus --enable-mp3lame --enable-pixman && make -j$(nproc) && make install && \
cd /root/xorgxrdp && ./bootstrap && ./configure && make -j$(nproc) && make install && \
cd /root && \
rm -R /root/xrdp && \
rm -R /root/xorgxrdp && \
# bugfix clipboard bug: [xrdp-chansrv] <defunct> && \
apt-mark manual libfdk-aac1 && \
apt-get -y purge \
git \
libxfont-dev \
libx11-dev \
libxfixes-dev \
libssl-dev \
libpam0g-dev \
libtool \
libjpeg-dev \
flex \
bison \
gettext \
autoconf \
libxml-parser-perl \
libfuse-dev \
xsltproc \
libxrandr-dev \
python-libxml2 \
nasm \
xserver-xorg-dev \
build-essential \
pkg-config \
libfdk-aac-dev \
libopus-dev \
libmp3lame-dev && \
# fuse \
apt-get -y autoclean && apt-get -y autoremove && \
apt-get -y purge $(dpkg --get-selections | grep deinstall | sed s/deinstall//g) && \
rm -rf /var/lib/apt/lists/* && \
echo "mate-session" > /etc/skel/.xsession && \
sed -i '/TerminalServerUsers/d' /etc/xrdp/sesman.ini && \
sed -i '/TerminalServerAdmins/d' /etc/xrdp/sesman.ini && \
sed -i -e '/DisconnectedTimeLimit=/ s/=.*/=0/' /etc/xrdp/sesman.ini && \
sed -i -e '/IdleTimeLimit=/ s/=.*/=0/' /etc/xrdp/sesman.ini && \
xrdp-keygen xrdp auto && \
mkdir -p /var/run/xrdp && \
chmod 2775 /var/run/xrdp && \
mkdir -p /var/run/xrdp/sockdir && \
chmod 3777 /var/run/xrdp/sockdir && \
touch /etc/skel/.Xauthority && \
mkdir /run/dbus/ && chown messagebus:messagebus /run/dbus/ && \
#dbus-uuidgen > /etc/machine-id && \
#ln -sf /var/lib/dbus/machine-id /etc/machine-id && \
echo "[program:xrdp-sesman]" > /etc/supervisor/conf.d/xrdp.conf && \
echo "command=/usr/local/sbin/xrdp-sesman --nodaemon" >> /etc/supervisor/conf.d/xrdp.conf && \
echo "process_name = xrdp-sesman" >> /etc/supervisor/conf.d/xrdp.conf && \
echo "[program:xrdp]" >> /etc/supervisor/conf.d/xrdp.conf && \
echo "command=/usr/local/sbin/xrdp -nodaemon" >> /etc/supervisor/conf.d/xrdp.conf && \
echo "process_name = xrdp" >> /etc/supervisor/conf.d/xrdp.conf
#RUN echo "[program:dbus-daemon]" > /etc/supervisor/conf.d/dbus-daemon.conf && \
# echo "command=/usr/bin/dbus-daemon --system --nofork" >> /etc/supervisor/conf.d/dbus-daemon.conf && \
# echo "process_name = dbus-daemon" >> /etc/supervisor/conf.d/dbus-daemon.conf && \
# echo "user = messagebus" >> /etc/supervisor/conf.d/dbus-daemon.conf
COPY xrdp.ini /etc/xrdp/xrdp.ini
COPY autostartup.sh /root/
CMD ["/bin/bash", "/root/autostartup.sh"]
EXPOSE 3389 22