制作安装包,来离线安装 doker 和 docker-compose
一、离线安装
1. Docker
Docker 官网离线安装文档:Install Docker Engine from binaries
整理步骤如下:
1.去官网下载 docker 安装包,地址为:https://download.docker.com/linux/static/stable/x86_64/;
2.解压;
3.移到 /usr/bin;
4.后台运行;
wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.22.tgz
tar -zxvf docker-20.10.22.tgz
sudocp docker/* /usr/bin/
# 在后台运行sudonohup dockerd &docker run hello-world
2. Docker-compose
1.去 https://github.com/docker/compose/releases 下载 docker-compose;
2.移动到 /usr/local/bin/docker-compose;
3.添加执行权限;
4.查看版本;
sudomv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
sudochmod +x /usr/local/bin/docker-compose
docker-compose -v
二、卸载
# 删除 dockersudorm -rf /usr/bin/docker*
# 删除 containerdsudorm -rf /usr/bin/containerd*
# 删除 docker 运行时 IDsudorm -rf /var/run/docker*
# 卸载 docker-composesudorm -rf /usr/local/bin/docker-compose
sudorm -rf /var/lib/docker*
sudorm -rf /var/lib/containerd*
版权归原作者 NoBiz 所有, 如有侵权,请联系我们删除。