Giter Club home page Giter Club logo

docker-qqnt's Introduction

docker-qqnt

在 Docker 中运行 QQNT 官方客户端

GitHub | GitHub Container Registry | Docker Hub

使用

在线尝试

Try in PWD

使用 Docker

docker run --rm -it -p 6080:80 -p 5901 -e VNC_PASSWD=password ilharp/qqnt

使用 Docker Compose

docker compose up

使用 Docker Swarm

docker stack deploy --compose-file docker-compose.yml qqnt

使用浏览器连接

在浏览器中打开 http://localhost:6080 然后输入密码 password 登录。

使用 VNC Viewer 连接

vncviewer :1 # 会连接到 127.0.0.1:5901

进入容器

进入容器(启动服务):

docker run --rm -it -p 6080:80 -p 5901 -e VNC_PASSWD=password ilharp/qqnt /sbin/my_init -- bash -l

进入容器(不启动任何服务):

docker run --rm -it -p 6080:80 -p 5901 -e VNC_PASSWD=password ilharp/qqnt bash

配方

持久化

  • 持久化数据: /root/.config/QQ
  • 持久化登录信息: /root/.config/QQ/global/nt_db

开发

构建 Linux QQ 镜像(自动)

先创建一个 builder:

docker buildx create --name container --driver=docker-container

构建镜像:

BUILD_DOCKER_BUILDER=container ./build.sh

构建 Windows QQ 镜像(手动)

构建 Windows QQ 镜像只能手动操作。手动构建的步骤较长,需要按步骤操作。

  1. 启动 ifrstr/wine
docker run --name wine-pre -it -p 6080:80 -p 5901 -e VNC_PASSWD=password ifrstr/wine
  1. 在浏览器中打开 http://localhost:6080 然后输入密码 password 登录到 VNC

  2. 另起一个终端,附加到容器

docker exec -it wine-pre bash
  1. 运行下面的命令
# 配置 Wine 使用的显示屏
export DISPLAY=:1
# 安装中文字体
/usr/bin/winetricks cjkfonts
# 下载并安装 MSVC
curl -fsSLo /tmp/vcredist.exe https://aka.ms/vs/17/release/vc_redist.x64.exe
/usr/bin/wine /tmp/vcredist.exe
# 下载并安装 QQ
curl -fsSLo /tmp/qqinst.exe https://dldir1.qq.com/qqfile/qq/QQNT/bbabcfd7/QQ9.9.0.14569_x64.exe
/usr/bin/wine /tmp/qqinst.exe
# QQ 显示「完成安装」按钮时,直接按「Ctrl-C」结束安装进程
# 清理临时文件
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

运行完成后,返回第一个终端,按「Ctrl-C」结束容器

  1. 提交容器为镜像
docker commit wine-pre wine-pre
  1. 打开 windows.dockerfile,替换 your-committed-image 为刚刚提交的镜像名称

  2. 执行后构建

docker build -t qqnt-windows windows.dockerfile

安全

VNC

VNC 协议本身并不安全,所以不要将容器端口暴露在公网。

Windows

Windows 镜像只能手动构建,Docker Registry 和 GitHub Container Registry 中的 Windows 镜像均为作者手动构建。如果需要安全构建,你需要按上面的步骤构建自己的镜像。

⚠️ 免责声明 ⚠️

本项目仅供学习研究使用。

许可

MIT

docker-qqnt's People

Contributors

ilharp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.