其他分享
首页 > 其他分享> > 参考官方文档装个Docker小鲸鱼玩玩

参考官方文档装个Docker小鲸鱼玩玩

作者:互联网

官方在线文档

Install Docker Engine on CentOS | Docker Documentation

 

1. 清理残留

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

2. 设置仓库

 sudo yum install -y yum-utils
 sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3. 安装 docker的containerd.io

 sudo yum install docker-ce docker-ce-cli containerd.io

4. 启动docker

sudo systemctl start docker

5. 查看当前镜像(空的)

sudo docker images   

6. 设置开机自启

sudo systemctl enable docker

7. 配置阿里云镜像加速

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

说明: 配置阿里云镜像加速后,docker pull拉取镜像起飞...

标签:装个,sudo,ce,systemctl,yum,鲸鱼,镜像,Docker,docker
来源: https://blog.csdn.net/asdfjklingok/article/details/121773032