- yum -y install gcc
- yum -y install gcc-c++
- yum install -y yum-utils
- yum-config-manager —add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
- yum makecache fast
- yum -y install docker-ce docker-ce-cli containerd.io
- systemctl start docker
- docker version
- ps -ef|grep docker
- docker run hello-world
- 配置镜像加速器
- mkdir -p /etc/docker
- tee /etc/docker/daemon.json <<-‘EOF’
{
“registry-mirrors”: [“https://afiyusyw.mirror.aliyuncs.com“]
}
EOF
- Systemctl restart docker 重启
- systemctl daemon-reload 重新加载服务配置文件
