Skip to content

Commit

Permalink
挂载持久化卷时,可以提前创建好对应目录,这样可以不依赖docker的自动创建目录的特性,避免权限问题 (#203)
Browse files Browse the repository at this point in the history
* Create persistent directorys before mounting

* Fixed the shellcheck warnings

* Ensure consistency

* Fixed the shellcheck warnings

---------

Co-authored-by: Huan Li <zixia@zixia.net>
  • Loading branch information
etoyz and huan authored Oct 24, 2023
1 parent aba2fab commit de069de
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dochat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ function main () {
# Issue #111 - https://github.com/huan/docker-wechat/issues/111
rm -f "$HOME/DoChat/Applcation Data/Tencent/WeChat/All Users/config/configEx.ini"

# Issue #165 - https://github.com/huan/docker-wechat/issues/165#issuecomment-1643063633
HOST_DIR_HOME_DOCHAT_WECHAT_FILES="$HOME/DoChat/WeChat Files/"
HOST_DIR_HOME_DOCHAT_APPLICATION_DATA="$HOME/DoChat/Applcation Data/"
mkdir "$HOST_DIR_HOME_DOCHAT_WECHAT_FILES" -p
mkdir "$HOST_DIR_HOME_DOCHAT_APPLICATION_DATA" -p

#
# --privileged: enable sound (/dev/snd/)
# --ipc=host: enable MIT_SHM (XWindows)
Expand All @@ -107,8 +113,8 @@ function main () {
--rm \
-i \
\
-v "$HOME/DoChat/WeChat Files/":'/home/user/WeChat Files/' \
-v "$HOME/DoChat/Applcation Data":'/home/user/.wine/drive_c/users/user/Application Data/' \
-v "$HOST_DIR_HOME_DOCHAT_WECHAT_FILES":'/home/user/WeChat Files/' \
-v "$HOST_DIR_HOME_DOCHAT_APPLICATION_DATA":'/home/user/.wine/drive_c/users/user/Application Data/' \
-v /tmp/.X11-unix:/tmp/.X11-unix \
\
-e DISPLAY \
Expand Down

0 comments on commit de069de

Please sign in to comment.