CentOS7中安装Docker服务支持
yum update
1 | $ sudo yum update |
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:
1 | $ sudo yum install -y yum-utils |
2. Get Docker CE
Install the latest version of Docker CE on CentOS:
1 | $ sudo yum -y install docker-ce |
Start Docker:
1 | $ sudo systemctl start docker |
3. Test your Docker CE installation
Test your installation:
1 | $ sudo docker run hello-world |
设置为开机自启
1 | $ sudo chkconfig docker on |