卸载docker
sudo apt-get purge --auto-remove docker
安装微信(沙箱操作不会影响自带的)
安装Flatpak
sudo apt install flatpak
sudo add-apt-repository ppa:flatpak/stable
sudo apt update
sudo apt install flatpak
安装Software Flatpak plugin
sudo apt install gnome-software-plugin-flatpak
更改国内镜像源
flatpak remote-add --if-not-exists flathub https://mirror.sjtu.edu.cn/flathub
安装wechat
flatpak install flathub com.tencent.WeChat
运行wechat
flatpak run com.tencent.WeChat
安装指定版本的docker,不带desktop
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
apt-cache madison docker-ce | awk '{ print $3 }'
选择一个版本
VERSION_STRING=5:19.03.14~3-0~ubuntu-focal
sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
运行试验代码
sudo docker run hello-world
给权限
# 将用户添加到docker组中
sudo usermod -aG docker 你的用户名
# 重启docker
systemctl restart docker
# 修改权限
sudo chmod 666 /var/run/docker.sock