centos7安装docker

centos7安装docker

添加docker yum源

cat >>/etc/yum.repos.d/docker.repo<<EOF
[docker-ce-edge]
name=Docker CE Edge - \$basearch
baseurl=https://mirrors.aliyun.com/docker-ce/linux/centos/7/\$basearch/edge
enabled=1
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/docker-ce/linux/centos/gpg
EOF

yum install

yum -y install docker-ce


### 查看docker版本
docker --version

### 启动docker
systemctl enable docker
systemctl start docker