debian 10.x (buster) 离线安装docker及卸载

下载deb安装包

官方deb安装包列表

https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/

依次下载containerd.iodocker-ce-clidocker-ce 三个软件包

wget https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/containerd.io_1.2.6-3_amd64.deb
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/docker-ce-cli_19.03.5~3-0~debian-buster_amd64.deb
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/docker-ce_19.03.5~3-0~debian-buster_amd64.deb

我缓存到内网服务器上了,使用内网地址下载

wget http://172.16.20.10/wangrui/deb/containerd.io_1.2.6-3_amd64.deb
wget http://172.16.20.10/wangrui/deb/docker-ce-cli_19.03.5~3-0~debian-buster_amd64.deb
wget http://172.16.20.10/wangrui/deb/docker-ce_19.03.5~3-0~debian-buster_amd64.deb

安装deb

dpkg -i containerd.io_1.2.6-3_amd64.deb
dpkg -i docker-ce-cli_19.03.5~3-0~debian-buster_amd64.deb
dpkg -i docker-ce_19.03.5~3-0~debian-buster_amd64.deb

验证docker环境

docker info
docker run --rm hello-world

卸载

“apt-get purge” 卸载命令需要逐条执行

apt-get purge docker-ce
apt-get purge docker-ce-cli
apt-get purge containerd.io

查看是否卸载完毕

apt list --installed | grep docker
apt list --installed | grep containerd.io

删除残留文件

rm -rf /var/lib/docker
rm -rf /var/run/docker
rm -rf /etc/docker
rm -rf /run/docker.sock
rm -rf /var/lib/containerd
rm -rf /run/containerd
rm -rf /opt/containerd
posted @ 2019-12-31 12:29  Nihaorz  阅读(4924)  评论(0编辑  收藏  举报