This repository has been archived by the owner on Mar 23, 2021. It is now read-only.
forked from RattyDAVE/docker-ubuntu-xrdp-mate-custom
-
Notifications
You must be signed in to change notification settings - Fork 594
/
Dockerfile
139 lines (133 loc) · 4.88 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
132
133
134
135
136
137
138
139
FROM ubuntu:20.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-applet-brisk-menu \
mate-notification-daemon \
mate-notification-daemon-common \
mplayer \
pulseaudio \
python \
python3-pip && \
apt-get install --no-install-recommends -yqq \
supervisor \
sudo \
tzdata \
nano \
mc \
ca-certificates \
xterm \
curl \
wget \
wmctrl && \
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 \
python-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 && \
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 && \
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 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 && make install && \
cd /root/xorgxrdp && ./bootstrap && ./configure && make && make install && \
cd /home && \
git clone https://github.com/rojserbest/vcpb.git vcpb && \
cd /root && \
rm -R /root/xrdp && \
rm -R /root/xorgxrdp && \
apt-mark manual libfdk-aac1 && \
apt-get -y purge \
libxfont-dev \
git \
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 \
pkg-config \
libfdk-aac-dev \
libopus-dev \
libmp3lame-dev && \
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/* && \
apt update && apt -y upgrade && \
apt-get install -yqq \
pavucontrol && \
cd /home/vcpb && \
pip3 install -U -r requirements.txt && \
cd /home && \
wget https://telegram.org/dl/desktop/linux -O tdesktop.tar.xz && tar -xf tdesktop.tar.xz && rm tdesktop.tar.xz && \
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/ && \
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
COPY xrdp.ini /etc/xrdp/xrdp.ini
COPY autostartup.sh /root/
COPY __init__.py /home/__init__.py
COPY xrdp-start.sh /
COPY script.sh /home/
COPY createusers.txt /root/
CMD ["/bin/bash", "/root/autostartup.sh"]
EXPOSE 3389 22