docker安装

  1. 安装相关依赖
yum install -y yum-utils device-mapper-persistent-data lvm2
  1. 配置国内源
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  1. 安装docker
sudo yum -y install docker-ce
  1. 启动&设置开机启动
  systemctl enable docker
  systemctl start docker
  1. 配置镜像加速/etc/docker/daemon.json
cd /etc/docker/
touch daemon.json
{
 "registry-mirrors": ["https://registry.docker-cn.com"]
}

你可能感兴趣的:(docker)