「Docker」- 安装(CentOS)

  CREATED BY JENKINSBOT

Docker 18.09.0 on CentOS 7.x

# 01/21/2019 Get Docker CE for CentOS
适用于:CentOS 7.0,CentOS 7.3, CentOs 7.6.18.10 (AltArch)

# 第一步、删除旧版本,并安装依赖
yum remove -y docker docker-client docker-client-latest docker-common \
    docker-latest docker-latest-logrotate docker-logrotate docker-engine

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

# 第二步、添加仓库并安装 Docker 服务
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce-18.09.0

# 第三步、启动 Docker 服务
systemctl start docker
systemctl enable docker

# 第四步、验证 Docker 服务正确安装
docker run --rm hello-world
docker -v