ubuntu卸载docker和安装微信

 卸载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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值