{"id":41951128,"url":"https://github.com/saroth/docker_wechat","last_synced_at":"2026-01-25T21:01:33.370Z","repository":{"id":210790565,"uuid":"727465711","full_name":"Saroth/docker_wechat","owner":"Saroth","description":"这是一个在Linux系统下，使用容器运行微信的方案，基于WeChatFerry部署","archived":false,"fork":false,"pushed_at":"2024-11-22T06:21:21.000Z","size":127,"stargazers_count":52,"open_issues_count":0,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-22T07:21:23.345Z","etag":null,"topics":["docker","linux","wechat","wechatferry"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Saroth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-04T23:12:58.000Z","updated_at":"2024-11-22T06:21:25.000Z","dependencies_parsed_at":"2024-11-22T07:20:27.229Z","dependency_job_id":"5e25384c-df6e-4bfe-b031-78470dcdb6ca","html_url":"https://github.com/Saroth/docker_wechat","commit_stats":null,"previous_names":["saroth/docker_wechat"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Saroth/docker_wechat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saroth%2Fdocker_wechat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saroth%2Fdocker_wechat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saroth%2Fdocker_wechat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saroth%2Fdocker_wechat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Saroth","download_url":"https://codeload.github.com/Saroth/docker_wechat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saroth%2Fdocker_wechat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28758474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T20:56:06.009Z","status":"ssl_error","status_checked_at":"2026-01-25T20:54:48.203Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","linux","wechat","wechatferry"],"created_at":"2026-01-25T21:01:28.748Z","updated_at":"2026-01-25T21:01:33.364Z","avatar_url":"https://github.com/Saroth.png","language":"Shell","readme":"# About\n这是一个在Linux系统下，使用容器运行微信的方案。\n*   容器运行环境：Docker、Wine、LXDE、xRDP\n    -   LXDE：轻量的桌面环境，微信只能在图形界面下安装和运行。\n    -   xRDP：用于从``Windows``远程连接桌面进行配置。\n*   基于[WeChatFerry](https://github.com/lich0821/WeChatFerry)部署，\n    thanks to [lich0821](https://github.com/lich0821)\n*   资源使用情况：\n    -   磁盘：\n        -   构建后镜像大小约4.69G；\n        -   Wine第一次启动，自动初始化后容器占用1.49G；\n        -   微信安装后，初始状态占用1.41G。\n            默认配置已将这部分文件放到宿主机的挂载目录；\n        -   微信长期使用，磁盘占用会持续增加；\n    -   内存：\n        -   桌面登录后，总占用194M；\n        -   微信启动，总占用约1.7G，微信登录后，总占用约**4.9G**。\n            宿主机需要预留充足的内存空间；\n\n# Usage\n## 获取资源\n在[WeChatFerry发布页](https://github.com/lich0821/WeChatFerry/releases)\n下载安装包``WeChatSetup``和工具包``v??.?.?.zip``，放到工程目录``./package``。\n\nWeChatFerry迭代频繁，当前**最新版本是![PyPi](https://img.shields.io/pypi/v/wcferry.svg)**\n\n## 构建镜像\n```sh\n$ sudo ./docker/docker_build.sh\n```\n\n*   默认使用``root``作为xRDP用户，默认密码为``123``，请按需修改。\n\n## 启动镜像\n```sh\n$ sudo ./docker/docker_run.sh\n```\n\n启动脚本的默认容器访问配置，``宿主机`` =\u003e ``容器``关系如下，请按需调整：\n*   端口映射：\n    -   xRDP端口： ``13389`` =\u003e ``3389``\n    -   WeChatFerry命令端口： ``18001`` =\u003e ``8001``\n    -   WeChatFerry消息端口： ``18002`` =\u003e ``8002``\n*   目录挂载：\n    -   安装资料： ``./package`` =\u003e ``/root/package`` (仅在第一次安装微信时使用)\n    -   程序文件： ``./wechat/program`` =\u003e ``/root/.wine/drive_c/Program\\ Files/Tencent/WeChat``\n    -   图标文件： ``./wechat/share/icons`` =\u003e ``/root/.local/share/icons``\n    -   用户数据： ``./wechat/user_dat`` =\u003e ``/root/.wine/drive_c/users/root/AppData/Roaming/Tencent/WeChat``\n    -   **将程序和用户数据目录挂载到宿主机，可避免在容器重置后再次安装程序**。\n\n## 登录桌面\n*   ``Windows``启动``远程桌面连接``，**地址**：``服务器IP:13389``\n*   进入xRDP登录窗口，**username**：``root``，**password**：``123``\n\n## 安装微信\n*   如果已配置了挂载目录，且已安装过微信，则不需要再次安装。\n*   进入桌面，启动安装程序。有2种启动方式：\n    1.  桌面快捷方式启动： 打开桌面图标``WeChatSetup``\n    2.  命令行启动：左下角启动终端``LXTerminal``，执行：\n        ```sh\n        $ wine package/WeChatSetup-*.exe\n        ```\n*   开始常规安装流程，完成安装后关闭。\n\n## 启动微信\n*   进入桌面，启动应用。有2种启动方式：\n    1.  桌面快捷方式启动： 打开桌面图标``WeChatFerry``\n    2.  命令行启动：左下角启动终端``LXTerminal``，执行：\n        ```sh\n        $ ./res/launch.sh\n        ```\n        启动后终端不能关闭或退出。\n*   微信常规配置，左下角Settings：\n    -   Notifications：关闭所有\n    -   General -\u003e General：不选所有\n    -   Manage Files -\u003e Auto-Download：不选\n*   启动并登录后，直接关闭远程桌面，不要``Logout``。\n    因为登出后图形界面下运行的所有程序都会退出。\n\n## 测试\n在主机运行测试脚本：``./test/test_wcferry.py``，消息默认发送给``文件传输助手``。\n\n# FAQ\n## 版本说明\n*   版本号和WeChatFerry保持基本一致，方便对照\n*   ``tag: v39.2``：支持WeChatFerry的``tag: v39.2.x``及以上版本\n\n## 运行报错\n*   故障现象：\n    -   不同环境现象不同，目前遇到以下几种\n    -   启动过程中Wine报错并退出\n    -   Wine启动立即报错并退出\n    -   xRDP连接报错\n*   故障分析：\n    -   目前启动异常的情况，常见于使用旧发行版系统的服务器，\n        如：CentOS 7 (kernel 4.x)。\n    -   经验证，使用较新发行版系统的服务器，都可以正常运行。\n        如：Fedora 39/40 (kernel 6.x)\n    -   具体原因暂不明确，推测与内核版本有关。\n*   解决方案：\n    -   建议使用较新的Linux发行版。\n\n## 闪退或应用黑屏\n*   故障现象：\n    -   应用启动立即退出\n    -   应用界面是黑的，但可以点击可以拖动，拖动过程又能看到应用界面\n*   故障分析：\n    -   故障出现之前有正常运行过。\n    -   目前仅在调试阶段有遇到。\n    -   调试过程中，某些操作可能误杀了系统服务进程\n*   解决方案：\n    -   关闭并删掉容器，重新启动镜像\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaroth%2Fdocker_wechat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaroth%2Fdocker_wechat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaroth%2Fdocker_wechat/lists"}