WeChat on Linux
Introduction
Tencent had not been releasing Linux WeChat for many years and Linux users would have to use Web WeChat. In 2021, Tencent separated from WeChat from Weixin, and somehow the WeChat users started not to be able to use Web WeChat anymore. There were other non-official WeChat applications for Linux, however, most of them have been deprecated or not trustworthy.
Running WeChat using Docker container is a good approach, as Docker does not contaminate the native host system environment. Most of the existing Docker WeChat use Wine to emulate Windows WeChat. The configuration is complex and the it has complex dependencies. So examining whether the third-party Docker WeChat is trustworthy is difficult.
In 2022, Tencent surprisingly released the official WeChat Linux build. But the release was for Ubuntu Kylin only. In principle, we should be able to install this WeChat build on Ubuntu as well.
In this blog post, I would like to discuss how to install the latest official WeChat Linux build in Ubuntu Docker image and how to run Docker WeChat.
Docker WeChat
Dockerfile
The following Dockerfile will install WeChat, Chinese language support, and fonts. The configurations and dependencies are simple and the applications being built should be trustworthy.
1 | FROM ubuntu:20.04 |
Build Docker Image
1 | $ docker build -f wechat.Dockerfile --tag wechat:0.0.1 . |
Push Docker Image
1 | $ docker tag wechat:0.0.1 leimao/wechat:0.0.1 |
Pull Docker Image
1 | $ docker pull leimao/wechat:0.0.1 |
Run Docker WeChat
We could run Docker WeChat using the following command.
1 | $ xhost + |
Known Issues
Input Methods
Switching input methods does not work for Docker WeChat. However, there is no problem copying and pasting Chinese in Docker WeChat.
Miscellaneous
To install and run WeChat via Wine in a Docker container, please read the blog post “Wine on Docker”. The Chinese input method does work via Wine.
References
WeChat on Linux