Centos 安装docker-ce

1:官方英文指导
https://docs.docker.com/install/linux/docker-ce/centos/

2: 中文指导
os要求Centos 7, centos-extrs 开启

 sudo yum udate
 sudo  yum remove docker \
              docker-client \
              docker-client-latest \
              docker-common \
              docker-latest \
              docker-latest-logrotate \
              docker-logrotate \
              docker-selinux \
              docker-engine-selinux \
              docker-engine
  sudo yum install -y yum-utils  device-mapper-persistent-data lvm2
  sudo yum-config-manager   --add-repo \
         https://download.docker.com/linux/centos/docker-ce.repo
  
  sudo yum install docker-ce

3: 将当前用户添加到docker用户组

  sudo gpasswd -a admin docker

4: 启动docker

    sudo systemctl start docker

5: 添加.sock 权限

 sudo chmod 777 /var/run/docker.sock

6: docker version

Centos 安装docker-ce_第1张图片
image.png

你可能感兴趣的:(Centos 安装docker-ce)