Install WeChat in Docker(DoChat) in Ubuntu

WeChat is a useful software to communicate with others. Unfortunately, WeChat Official does not provide Linux version. DoChat is a great alternative.

Introduction

Some methods to use WeChat in Linux are here:

And the project DoChat provides the third method with painless installation scripts.

Usage

1. Install docker

See This tutorial to install docker engine. For my Ubuntu, I can use

1
2
$ curl -fsSL https://test.docker.com -o test-docker.sh
$ sudo sh test-docker.sh

Note: If you have installed docker desktop before, remember to uninstall it. See Docker offical doc to uninstall. Pay particular attention to the modification of $HOME/.docker/config.json!

2. Use the DoChat

Refer to DoChat git repository, use

1
curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh | bash

to run the DoChat.

3. Some improvement

The output of the program is quite annoying. What I prefer is to create a script for this, for example, ~/Program/wechat:

1
2
3
#!/usr/bin/env bash

curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh | bash 2>/dev/null >/dev/null &

And after add $HOME/Program to $PATH, simply using wechat command could open the wechat clearly.

4. Transferring files.

We can use $HOME/DoChat/WeChat Files/ as a intermediary of the host and the guest. Binding a soft link to $HOME/DoChat/WeChat Files/[WXID]/FileStorage/File/ is a good idea.