如何在centos7 上安装 docker container

如何在centos7 上安装 docker container

有两种方法

1  从 get.docker.com 下载安装包

# yum update # curl -sSL https://get.docker.com/ | sh # service docker start # docker run hello-world 

2  用 yum package manager 直接安装

Install Docker via yum package manager.

 # yum update
 # cat >/etc/yum.repos.d/docker.repo <<-EOF
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
 # yum install docker-engine
 # service docker start
 # docker run hello-world