一:官网
二:centos7安装docker
2.1 安装yum-utils
1
| sudo yum install -y yum-utils
|
2.2 centos使用阿里云仓库
1
| sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
|
2.3 安装docker引擎
1 2
| -- 安装最新的docker引擎 sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
2.4 启动docker并查看版本
1 2 3 4 5 6
| -- 启动docker sudo systemctl start docker -- 查询docker ps -ef|grep docker -- 查询docker版本 sudo docker version
|

2.5 配置阿里云镜像加速器
1 2 3 4 5
| -- 配置阿里云镜像加速器 1.登录阿里云 2.搜索“容器镜像服务ACR” 3.点击左侧镜像工具-镜像加速器 4.执行命令
|

2.6 执行hello-world
1
| sudo docker run hello-world
|

2.7 停止和重启dockert
1 2 3 4
| -- 停止 sudo systemctl stop docker -- 重启 sudo systemctl restart docker
|
2.8 卸载
1 2
| rm -rf /var/lib/docker rm -rf /var/lib/contaionerd
|
*************感谢您的阅读*************