forked from zsxsoft/docker-wine-webshellkill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
69 lines (61 loc) · 3.11 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
FROM oott123/novnc:v0.1.1
RUN apt-get update && \
apt-get install -y \
software-properties-common apt-transport-https \
cabextract unzip python-numpy \
language-pack-zh-hans ttf-wqy-microhei && \
# 安装 wine
wget -nc https://dl.winehq.org/wine-builds/Release.key -O /tmp/wine.key && \
apt-key add /tmp/wine.key && rm -f /tmp/wine.key && \
apt-add-repository -y https://dl.winehq.org/wine-builds/ubuntu && \
dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y --install-recommends --allow-unauthenticated winehq-devel && \
wget -O /usr/local/bin/winetricks https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks && \
chmod 755 /usr/local/bin/winetricks && \
apt-get clean && \
rm -rf /var/lib/apt/lists
COPY winhttp_2ksp4.verb /tmp/winhttp_2ksp4.verb
COPY customize.reg /tmp/customize.reg
COPY d99net.reg /tmp/d99net.reg
COPY luna.msstyles /tmp/luna.msstyles
RUN sudo -Hu user WINEARCH=win32 /usr/bin/wine wineboot && \
sudo -Hu user mkdir -p /home/user/.wine/drive_c/windows/Resources/Themes/luna/ && \
sudo -Hu user cp /tmp/luna.msstyles /home/user/.wine/drive_c/windows/Resources/Themes/luna/luna.msstyles && \
sudo -Hu user /usr/bin/wine regedit.exe /s /tmp/customize.reg && \
sudo -Hu user /usr/bin/wine regedit.exe /s /tmp/d99net.reg && \
sudo -Hu user wineboot && \
echo 'quiet=on' > /etc/wgetrc && \
mkdir /tmp/mdac && \
sudo -Hu user /usr/local/bin/winetricks -q win7 && \
sudo -Hu user /usr/local/bin/winetricks -q /tmp/winhttp_2ksp4.verb && \
sudo -Hu user /usr/local/bin/winetricks -q msscript && \
sudo -Hu user /usr/local/bin/winetricks -q fontsmooth=rgb && \
wget https://dlsec.cqp.me/docker-simsun -O /tmp/simsun.zip && \
wget https://download.microsoft.com/download/4/a/a/4aafff19-9d21-4d35-ae81-02c48dcbbbff/MDAC_TYP.EXE -O /tmp/mdac/mdac.exe && \
rm /etc/wgetrc && \
mkdir -p /home/user/.wine/drive_c/windows/Fonts && \
unzip /tmp/simsun.zip -d /home/user/.wine/drive_c/windows/Fonts && \
rm -f /tmp/simsun.zip && \
mkdir /home/user/webshellkill && \
chsh -s /bin/bash user && \
rm -rf /home/user/.cache/winetricks && \
cd /tmp/mdac && cabextract *.exe && cabextract *.cab && rm -rf *.cab && sudo -Hu user cp * /home/user/.wine/drive_c/windows/system32/ && \
for i in *.dll; do sudo -Hu user wine regsvr32 "c:\\windows\\system32\\$i"; done || \
# Have to regsvr32 twice, maybe dependency issue here
for i in *.dll; do sudo -Hu user wine regsvr32 "c:\\windows\\system32\\$i"; done || \
rm -rf /tmp/mdac && cd /
ENV LANG=zh_CN.UTF-8 \
LC_ALL=zh_CN.UTF-8 \
WEBSHELLKILL_URL=http://d99net.net/down/WebShellKill_V2.0.9.zip
RUN mkdir /tmp/wsk && \
wget $WEBSHELLKILL_URL -O /tmp/wsk/webshellkill.zip && \
echo 'Unzipping WebShellKill ...' && \
cd /tmp/wsk && \
LC_ALL=zh_CN.UTF-8 unzip webshellkill.zip && \
mv ./*.exe /home/user/webshellkill && \
chown -R user:user /home/user/webshellkill && \
rm -rf /tmp/wsk
COPY vncmain.sh /app/vncmain.sh
COPY wsk /usr/local/bin/wsk
VOLUME ["/home/user/webshellkill"]