feat: improve container configuration management and user experience

- Add automatic config version control for seamless upgrades
- Update autostart script to use wechat-start.sh for better initialization
- Add comprehensive WeChat management scripts (start, restart, unminimize)
- Enhance right-click menu with WeChat restart and restore functionality
- Improve Dockerfile cleanup process for smaller image size
- Add volume mounting examples in documentation for data persistence
- Include upgrade troubleshooting notes for openbox configuration
- Add Star History chart and additional reference links

This update ensures users get the latest menu configurations automatically
without manual intervention during container updates.
This commit is contained in:
Nick007
2025-10-20 20:20:54 +08:00
parent 8df5894b92
commit 8f8af073f2
8 changed files with 42 additions and 5 deletions

View File

@@ -30,7 +30,14 @@ RUN apt-get update && \
libfontconfig1 libdbus-1-3 libnss3 libx11-xcb1
# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN apt-get purge -y --autoremove
RUN apt-get autoclean && \
rm -rf \
/config/.cache \
/config/.npm \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
# Install WeChat based on target architecture
RUN case "$TARGETPLATFORM" in \

View File

@@ -31,7 +31,7 @@
1. **直接使用已构建的镜像进行快速部署**
```bash
docker run -it -p 3001:3001 ghcr.io/nickrunning/wechat-selkies:latest
docker run -it -p 3001:3001 -v ./config:/config ghcr.io/nickrunning/wechat-selkies:latest
```
2. **访问微信**
@@ -81,6 +81,8 @@ docker run -it -p 3001:3001 ghcr.io/nickrunning/wechat-selkies:latest
- `./config:/config`: 微信配置和数据持久化目录
> 如果升级后右键菜单缺少 `WeChat` 相关选项请先清空本地挂载目录下的openbox目录(如`./config/.config/openbox`)。
## 高级配置
### 硬件加速
@@ -191,3 +193,8 @@ docker-compose logs -f wechat-selkies
- [微信官方网站](https://weixin.qq.com/)
- [Selkies WebRTC](https://github.com/selkies-project)
- [LinuxServer.io](https://github.com/linuxserver)
- [xiaoheiCat/docker-wechat-sogou-pinyin](https://github.com/xiaoheiCat/docker-wechat-sogou-pinyin)
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=nickrunning/wechat-selkies&type=Date)](https://www.star-history.com/#nickrunning/wechat-selkies&Date)

View File

@@ -31,7 +31,7 @@ This project packages the official WeChat Linux client in a Docker container, en
1. **Direct deployment using pre-built images**
```bash
docker run -it -p 3001:3001 ghcr.io/nickrunning/wechat-selkies:latest
docker run -it -p 3001:3001 -v ./config:/config ghcr.io/nickrunning/wechat-selkies:latest
```
2. **Access WeChat**
@@ -81,6 +81,8 @@ Configure the following environment variables in `docker-compose.yml`:
- `./config:/config`: WeChat configuration and data persistence directory
> Note: If the right-click menu lacks `WeChat` related options after an upgrade, please clear the `openbox` directory in the local mounted directory (e.g., `./config/.config/openbox`).
## Advanced Configuration
### Hardware Acceleration
@@ -192,3 +194,8 @@ For more information about GPL-3.0 license, please visit: https://www.gnu.org/li
- [WeChat Official Website](https://weixin.qq.com/)
- [Selkies WebRTC](https://github.com/selkies-project)
- [LinuxServer.io](https://github.com/linuxserver)
- [xiaoheiCat/docker-wechat-sogou-pinyin](https://github.com/xiaoheiCat/docker-wechat-sogou-pinyin)
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=nickrunning/wechat-selkies&type=Date)](https://www.star-history.com/#nickrunning/wechat-selkies&Date)

View File

@@ -1 +1 @@
wechat
/scripts/wechat/wechat-start.sh

8
root/defaults/menu.xml Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU">
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><command>/usr/bin/xterm</command></action></item>
<item label="WeChat" icon="/usr/share/icons/hicolor/48x48/apps/wechat.png"><action name="Execute"><command>/scripts/wechat/wechat-restart.sh</command></action></item>
<item label="Restore WeChat" icon="/usr/share/icons/hicolor/48x48/apps/wechat.png"><action name="Execute"><command>/scripts/wechat/wechat-unminimize.sh</command></action></item>
</menu>
</openbox_menu>

View File

@@ -0,0 +1,3 @@
#!/bin/bash
pkill -9 -f /usr/bin/wechat 2>/dev/null
nohup /usr/bin/wechat >/dev/null 2>&1 &

View File

@@ -0,0 +1,3 @@
#!/bin/bash
/usr/bin/wechat

View File

@@ -0,0 +1,2 @@
#!/bin/bash
xdotool windowmap `xdotool search --name "微信(测试版)"` || xdotool windowmap `xdotool search --name "WeChat Beta"`