This repository was archived by the owner on Mar 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (44 loc) · 2.04 KB
/
Dockerfile
File metadata and controls
52 lines (44 loc) · 2.04 KB
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
FROM bestwu/wine:i386
LABEL maintainer='BoringCat <boringcat@outlook.com>'
ARG WXWORK_VERSION=3.0.14.1205
RUN set -xe && \
echo 'deb https://mirrors.aliyun.com/deepin stable main non-free contrib' > /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends deepin.com.weixin.work wget && \
apt-get -y autoremove && apt-get clean -y && apt-get autoclean -y && \
find /var/lib/apt/lists -type f -delete && \
find /var/cache -type f -delete && \
find /var/log -type f -delete && \
find /usr/share/doc -type f -delete && \
find /usr/share/man -type f -delete
COPY files.7z /tmp/files.7z
RUN set -xe && \
wget https://dldir1.qq.com/wework/work_weixin/WXWork_${WXWORK_VERSION}.exe -O /tmp/WXWork.exe && \
mkdir -p /tmp/drive_c/Program\ Files/WXWork && \
7z x -o/tmp/drive_c/Program\ Files/WXWork /tmp/WXWork.exe && \
rm -r /tmp/drive_c/Program\ Files/WXWork/\$PLUGINSDIR/ && \
cd /tmp/ && \
7z a files.7z drive_c/ && \
mv /tmp/files.7z /opt/deepinwine/apps/Deepin-WXWork/files.7z
ENV APP=WXWork \
AUDIO_GID=995 \
VIDEO_GID=986 \
GID=1000 \
UID=1000 \
DPI=96 \
DEBUG=0 \
WAIT_FOR_SLEEP=5
RUN set -xe && \
groupadd -o -g $GID wechat && \
groupmod -o -g $AUDIO_GID audio && \
groupmod -o -g $VIDEO_GID video && \
useradd -d "/home/wechat" -m -o -u $UID -g wechat -G audio,video wechat && \
mkdir /WXWork && \
chown -R wechat:wechat /WXWork && \
su wechat -c 'ln -s "/WXWork" "/home/wechat/WXWork"' && \
INSERTLINE=$(awk '{if(match($0,/ExtractApp\(\)/)){f=1}else if(match($0,/^}\s?$/)&&f){f=0;print NR-2}}' /opt/deepinwine/tools/run_v2.sh) && \
sed -i "${INSERTLINE}a\\\\tREGDPI=\$(printf '\"LogPixels\"=dword:%08x' \$DPI)\\n\\tsed -i \"s/\\\\\"LogPixels\\\\\"=.*$/\$REGDPI/g\" \$1/system.reg" /opt/deepinwine/tools/run_v2.sh && \
sed -i 's/RunApp "\\$3" .*/S3=$3\\n\\t\\tshitf 4\\n\\t\\tRunAPP "$S3" "$@"/g' /opt/deepinwine/tools/run_v2.sh
VOLUME ["/WXWork", "/HostHome"]
ADD entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]