{"id":13437430,"url":"https://github.com/top-bettercode/docker-qq","last_synced_at":"2025-09-01T09:37:28.344Z","repository":{"id":54925014,"uuid":"98796610","full_name":"top-bettercode/docker-qq","owner":"top-bettercode","description":"提供一种在linux下运行QQ的方式","archived":false,"fork":false,"pushed_at":"2021-03-04T02:56:36.000Z","size":47,"stargazers_count":401,"open_issues_count":21,"forks_count":50,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-05T23:42:08.660Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/bestwu/qq/","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/top-bettercode.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}},"created_at":"2017-07-30T12:40:58.000Z","updated_at":"2025-03-21T08:40:35.000Z","dependencies_parsed_at":"2022-08-14T06:40:56.380Z","dependency_job_id":null,"html_url":"https://github.com/top-bettercode/docker-qq","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/top-bettercode/docker-qq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-bettercode%2Fdocker-qq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-bettercode%2Fdocker-qq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-bettercode%2Fdocker-qq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-bettercode%2Fdocker-qq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/top-bettercode","download_url":"https://codeload.github.com/top-bettercode/docker-qq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/top-bettercode%2Fdocker-qq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273100638,"owners_count":25045699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-07-31T03:00:56.907Z","updated_at":"2025-09-01T09:37:28.319Z","avatar_url":"https://github.com/top-bettercode.png","language":"Dockerfile","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"[![Docker Image](https://img.shields.io/badge/docker%20image-available-green.svg)](https://hub.docker.com/r/bestwu/qq/)\n[![Image Layers and Size](https://images.microbadger.com/badges/image/bestwu/qq.svg)](http://microbadger.com/images/bestwu/qq)\n\n本镜像基于[深度操作系统](https://www.deepin.org/download/)\n\n提供一种在linux下运行QQ的方式\n\n### Supported tags\n\n* im ([QQ 9.1.8](https://github.com/bestwu/docker-qq/blob/master/im/Dockerfile))\n* light,latest ([QQLight 7.9](https://github.com/bestwu/docker-qq/blob/master/im.light/Dockerfile))\n* office ([TIM 2.0](https://github.com/bestwu/docker-qq/blob/master/office/Dockerfile))\n* eim ([EIM 1.9](https://github.com/bestwu/docker-qq/blob/master/eim/Dockerfile))\n\n### 准备工作\n\n允许所有用户访问X11服务,运行命令:\n\n```bash\n    xhost +\n```\n\n## 查看系统组ID\n\n为了使用声音和对应的视频设备，需要具有系统特定组的权限，因此需要获得对应的组ID。\n\n获取 `audio` 组 ID\n\n```bash\n$ getent group audio | cut -d: -f3\n63\n```\n\n这里取得的 `63` 就是 `audio` 组的组 ID，替换下面命令中对应的ID。\n\n获取 `video` 组 ID\n\n```bash\n$ getent group video | cut -d: -f3\n44\n```\n\n### 更新\n\n进入docker容器：docker exec -it qq bash\n运行以下命令更新深度软件包：\n\n```bash\napt-get update\n\n\n# 更新企业版\n# apt-get install -y deepin.com.qq.b.eim \n# 更新QQ\napt-get install -y deepin.com.qq.im\n# 更新轻聊版\n# apt-get install -y deepin.com.qq.im.light \n# 更新TIM\n# apt-get install -y deepin.com.qq.office\n\n```\n\n### 运行QQ\n\n#### docker-compose\n\n建立 `docker-compose.yml` 文件，内容如下：\n\n```yml\nversion: '2'\nservices:\n  qq:\n    image: bestwu/qq:office\n    container_name: qq\n    ipc: host\n    devices:\n      - /dev/snd #声音\n    volumes:\n      - /tmp/.X11-unix:/tmp/.X11-unix\n      - /home/peter/TencentFiles:/TencentFiles #使用自己的用户路径\n    environment:\n      - DISPLAY=unix$DISPLAY\n      - XMODIFIERS=@im=fcitx #中文输入\n      - QT_IM_MODULE=fcitx\n      - GTK_IM_MODULE=fcitx\n      - AUDIO_GID=63 # 可选 默认63（fedora） 主机audio gid 解决声音设备访问权限问题\n      - GID=$GID # 可选 默认1000 主机当前用户 gid 解决挂载目录访问权限问题\n      - UID=$UID # 可选 默认1000 主机当前用户 uid 解决挂载目录访问权限问题\n```\n\n然后在命令行运行：\n\n```bash\ndocker-compose up -d\n```\n\n#### docker run\n\n也可以使用 `docker run` 命令直接在命令行执行：\n\n```bash\n  docker run -d --name qq \\\n    --device /dev/snd --ipc=\"host\"\\\n    -v $HOME/TencentFiles:/TencentFiles \\\n\t-v /tmp/.X11-unix:/tmp/.X11-unix \\\n    -e XMODIFIERS=@im=fcitx \\\n    -e QT_IM_MODULE=fcitx \\\n    -e GTK_IM_MODULE=fcitx \\\n    -e DISPLAY=unix$DISPLAY \\\n    -e AUDIO_GID=`getent group audio | cut -d: -f3` \\\n    -e VIDEO_GID=`getent group video | cut -d: -f3` \\\n    -e GID=`id -g` \\\n    -e UID=`id -u` \\\n    bestwu/qq:office\n```\n\n可以写入一个脚本来方便以后调用。\n\n#### 维护\n\n停止容器\n\n```bash\ndocker stop qq\n```\n\n删除容器\n\n```bash\ndocker rm qq\n```\n\n如果容器没有退出需要强行删除，可以加 `-f` 参数\n\n```bash\ndocker rm -f qq\n```\n\n### 已知问题\n\n* 界面未显示异常\n\n如果界面未显示，运行：\n\n```bash\ndocker logs qq\n```\n\n如果出现如下错误：\n\n```log\nX Error of failed request： BadAccess （attempt access private resource ***）\n Major opcode of failed request：130（MIT-SHM)\n```\n\n这是因为本地的linux中默认开启了“MIT-SHM”共享X进程内存的功能，禁用该共享功能即可。\n\n具体操作：\n\n```bash\nvi /etc/X11/xorg.conf\n```\n\n增加：\n\n```bash\n Section \"Extensions\"\n     Option \"MIT-SHM\" \"Disable\"\n EndSection\n```\n\n重启系统\n\n* 无声音\n\n请尝试以下配置\n\n```yml\nversion: '2'\nservices:\n  qq:\n    image: bestwu/qq:office\n    container_name: qq\n    volumes:\n      - /tmp/.X11-unix:/tmp/.X11-unix\n      - /run/user/1000/pulse/native:/run/user/1000/pulse/native\n      - /home/peter/TencentFiles:/TencentFiles\n    environment:\n      - DISPLAY=unix$DISPLAY\n      - PULSE_SERVER=unix:/run/user/1000/pulse/native\n      - XDG_RUNTIME_DIR=/run/user/1000\n      - QT_IM_MODULE=fcitx\n      - XMODIFIERS=@im=fcitx\n      - GTK_IM_MODULE=fcitx\n      - AUDIO_GID=63 # 可选 默认63（fedora） 主机audio gid 解决声音设备访问权限问题\n      - GID=$GID # 可选 默认1000 主机当前用户 gid 解决挂载目录访问权限问题\n      - UID=$UID # 可选 默认1000 主机当前用户 uid 解决挂载目录访问权限问题\n```\n\n```bash\n  docker run -d --name qq \\\n    -v ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native \\\n    -v $HOME/TencentFiles:/TencentFiles \\\n    -v /tmp/.X11-unix:/tmp/.X11-unix \\\n    -e XMODIFIERS=@im=fcitx \\\n    -e QT_IM_MODULE=fcitx \\\n    -e GTK_IM_MODULE=fcitx \\\n    -e PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \\\n    -e XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR} \\\n    -e DISPLAY=unix$DISPLAY \\\n    -e GID=`id -g` \\\n    -e UID=`id -u` \\\n    bestwu/qq:office\n```\n\n* 非gnome桌面无法显示界面\n\n```\nX Error of failed request:  BadWindow (invalid Window parameter)\n  Major opcode of failed request:  20 (X_GetProperty)\n  Resource id in failed request:  0x0\n  Serial number of failed request:  10\n  Current serial number in output stream:  10\n```\n解决方法：安装gnome-settings-daemon，然后运行/usr/lib/gsd-xsettings\n\n* 检测不到摄像头，不能视频\n\n* （TIM）同意加好友申请后崩溃\n\n* Wayland 显示服务器，截图功能异常\n\n* 无法直接点击打开链接\n\n* 无法拖拽发送文件。使用挂载目录方式，点击发送文件按钮，选择文件\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftop-bettercode%2Fdocker-qq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftop-bettercode%2Fdocker-qq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftop-bettercode%2Fdocker-qq/lists"}