docker安装
卸载旧的版本
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
1.安装前需要的安装包
yum install -y yum-utils device-mapper-persistent-data lvm2
2.使用阿里国内源安装docker
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3.更新yum软件包索引
yum makecache fast
4.安装docker
yum install docker-ce docker-ce-cli containerd.io
5.启动docker
systemctl start docker
6.跑hello-world
docker run hello-world
7.卸载docker
# 卸载依赖
yum remove docker-ce docker-ce-cli containerd.io
# 删除资源
rm -rf /var/lib/docker
其它教程: https://developer.aliyun.com/article/765545
|