1、安装docker
yum install -y docker
2、创建docker目录(如果有则不需要创建)
mkdir -p /etc/docker
3、创建配置文件并配置加速地址
tee /etc/docker/daemon.json <<-‘EOF’
{
“registry-mirrors”: [“https://7ob193nw.mirror.aliyuncs.com”]
}
EOF
4、重新加载配置文件
systemctl daemon-reload
5、重启docker
systemctl restart docker
6、拉取一个docker镜像
docker pull hello-world
7、查看拉取的镜像
docker images
8、运行拉取的镜像
docker run hello-world看到以上信息时,恭喜你,运行成功!
PS:阿里云加速地址获取方式
1、登录阿里云开发平台
https://promotion.aliyun.com/ntms/act/kubernetes.html#industry