Centos8安装Docker

查看Centos版本

cat /etc/redhat-release

添加镜像

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

安装依赖

yum -y install yum-utils device-mapper-persistent-data lvm2

安装最新版本containerd.io

https://download.docker.com/linux/centos/7/x86_64/stable/Packages/

sudo dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.6.8-3.1.el7.x86_64.rpm

安装Docker

sudo yum install docker-ce docker-ce-cli

查看Docker版本

docker version

阿里云容器镜像服务

https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

配置镜像加速器

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://n5odib5o.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注