Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
huan committed Sep 2, 2021
1 parent c51d1fd commit 5d57b88
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ RUN apt update && apt install -y \
&& apt-get clean \
&& rm -fr /tmp/*

RUN chown user /home \
&& locale-gen en_US.UTF-8 \
&& echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& echo "127.0.0.1 dldir1.qq.com" >> /etc/hosts

ENV \
LANG=zh_CN.UTF-8 \
LC_ALL=zh_CN.UTF-8
Expand All @@ -23,6 +18,11 @@ COPY --chown=user:group container_root/ /
COPY [A-Z]* /
COPY VERSION /VERSION.docker-wechat

RUN chown user /home \
&& localedef -i zh_CN -c -f UTF-8 zh_CN.UTF-8 \
&& echo 'user ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers \
&& echo '127.0.0.1 dldir1.qq.com' >> /etc/hosts

USER user
RUN bash -x /setup.sh
ENTRYPOINT [ "/entrypoint.sh" ]
Expand Down
5 changes: 5 additions & 0 deletions container_root/dochat/patch-hosts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -eo pipefail

# https://stackoverflow.com/a/82278/1123955
sudo sh -c 'echo "127.0.0.1 dldir1.qq.com" >> /etc/hosts'
4 changes: 2 additions & 2 deletions container_root/dochat/peres-wechat-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ set -eo pipefail
#
# Generate WeChat Version file by `peres` tool
#
#
# Generate WeChat Version file
# Product Version: 3.3.0.115
# -> 3.3.0.115
#
WECHAT_DIR='/home/user/.wine/drive_c/Program Files/Tencent/WeChat'

peres -v "$WECHAT_DIR"/WeChatWin.dll | grep 'Product Version: ' | awk '{print $3}' > /home/VERSION.WeChat
echo 'WeChat VERSION generated:'
cat /home/VERSION.WeChat
1 change: 1 addition & 0 deletions container_root/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function startWechat () {
hello
setupFontDpi

/dochat/patch-hosts.sh
/dochat/disable-upgrade.sh

if [ -n "$DOCHAT_DEBUG" ]; then
Expand Down

0 comments on commit 5d57b88

Please sign in to comment.