yum update
tee /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 -y install docker-engine
service docker start
查看状态
systemctl status docker.service
===========================================================
Get Docker CE on CentOS
You can install Docker CE on CentOS in just three steps.
Enterprise customers can also install Docker EE for CentOS.
Prerequisites
Docker CE is supported on CentOS 7.3 64-bit.
1. Set up the repository
Set up the Docker CE repository on CentOS:
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
2. Get Docker CE
Install the latest version of Docker CE on CentOS:
sudo yum -y install docker-ce
Start Docker:
sudo systemctl start docker
3. Test your Docker CE installation
Test your installation:
sudo docker run hello-world
tee /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 -y install docker-engine
service docker start
查看状态
systemctl status docker.service
===========================================================
Get Docker CE on CentOS
You can install Docker CE on CentOS in just three steps.
Enterprise customers can also install Docker EE for CentOS.
Prerequisites
Docker CE is supported on CentOS 7.3 64-bit.
1. Set up the repository
Set up the Docker CE repository on CentOS:
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
2. Get Docker CE
Install the latest version of Docker CE on CentOS:
sudo yum -y install docker-ce
Start Docker:
sudo systemctl start docker
3. Test your Docker CE installation
Test your installation:
sudo docker run hello-world