This repository has been archived by the owner on Jan 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
176 lines (174 loc) · 4.01 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
FROM alpine:3.10
ADD ./scripts /usr/sbin
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing/" \
>> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/v3.10/community/" \
>> /etc/apk/repositories \
# Deps
&& apk --no-cache upgrade \
&& apk --no-cache add \
bash \
curl \
dbus-x11 \
inotify-tools \
ffmpeg \
gstreamer \
libvpx \
libxcomposite \
libxdamage \
libxext \
libxfixes \
libxkbfile \
libxrandr \
libxtst \
lz4 \
lzo \
openrc \
openssh \
openssl \
py-asn1 \
py-cffi \
py-cryptography \
py-dbus \
py-enum34 \
py-gobject3 \
py-gtk \
py-gtkglext \
py-idna \
py-ipaddress \
py-lz4 \
py-netifaces \
py-numpy \
py-pillow \
py-rencode \
py-six \
py2-pip \
py2-xxhash \
shared-mime-info \
x264 \
xhost \
xorg-server \
# Meta build-deps
&& apk --no-cache add --virtual build-deps \
autoconf \
automake \
build-base \
coreutils \
cython-dev \
inotify-tools-dev \
ffmpeg-dev \
flac-dev \
git \
libc-dev \
libtool \
libvpx-dev \
libxcomposite-dev \
libxdamage-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxkbfile-dev \
libxrandr-dev \
libxtst-dev \
linux-headers \
lz4-dev \
musl-utils \
npm \
opus-dev \
py-dbus-dev \
py-gtk-dev \
py-gtkglext-dev \
py-numpy-dev \
py-yuicompressor \
python-dev \
util-macros \
which \
x264-dev \
xorg-server-dev \
xorgproto \
xvidcore-dev \
xz \
&& npm install uglify-js@2 -g \
&& pip2 install git+https://github.com/paramiko/paramiko.git \
git+https://github.com/Legrandin/pycryptodome.git \
git+https://github.com/dsoprea/PyInotify.git \
git+https://github.com/novnc/websockify.git \
# Xpra
&& mv /usr/sbin/xpra.tar.xz /tmp \
&& cd /tmp \
&& tar -xf "xpra.tar.xz" \
&& cd "xpra-3.0.1" \
&& echo -e 'Section "Module"\n Load "fb"\n EndSection' \
>> etc/xpra/xorg.conf \
&& python2 setup.py install \
--verbose \
--with-Xdummy \
--with-Xdummy_wrapper \
--with-bencode \
--with-clipboard \
--with-csc_swscale \
--with-cython_bencode \
--with-dbus \
--with-enc_ffmpeg \
--with-enc_x264 \
--with-gtk2 \
--with-gtk_x11 \
--with-pillow \
--with-server \
--with-vpx \
--with-vsock \
--with-x11 \
--without-client \
--without-csc_libyuv \
--without-cuda_kernels \
--without-cuda_rebuild \
--without-dec_avcodec2 \
--without-enc_x265 \
--without-gtk3 \
--without-mdns \
--without-opengl \
--without-printing \
--without-uinput \
--without-sound \
--without-strict \
--without-webcam \
&& mkdir -p /var/run/xpra/ \
&& cd /tmp \
# su-exec
&& git clone --depth 1 https://github.com/ncopa/su-exec.git \
/tmp/su-exec \
&& cd /tmp/su-exec \
&& make \
&& chmod 770 su-exec \
&& mv su-exec /usr/sbin/ \
# xf86-video-dummy
&& mv /usr/sbin/patches /tmp \
&& git clone --depth 1 https://github.com/JAremko/xf86-video-dummy.git \
/tmp/xf86-video-dummy \
&& cd /tmp/xf86-video-dummy \
&& git apply \
/tmp/patches/Constant-DPI.patch \
/tmp/patches/fix-pointer-limits.patch \
/tmp/patches/30-bit-depth.patch \
&& aclocal \
&& autoconf \
&& automake \
--add-missing \
--force-missing \
&& ./configure \
&& make \
&& make install \
&& mv /usr/local/lib/xorg/modules/drivers/dummy_drv.so \
/usr/lib/xorg/modules/drivers/ \
# Cleanup
&& apk del build-deps \
&& rm -rf /var/cache/* /tmp/* /var/log/* ~/.cache \
&& mkdir -p /var/cache/apk \
# SSH
&& mkdir -p /var/run/sshd \
&& chmod 0755 /var/run/sshd \
&& rc-update add sshd \
&& rc-status \
&& touch /run/openrc/softlevel \
&& /etc/init.d/sshd start > /dev/null 2>&1 \
&& /etc/init.d/sshd stop > /dev/null 2>&1