Environment: centos7
Installation dependencies
yum install -y yum-utils device-mapper-persistent-data lvm2
Add Docker package source
yum-config-manager --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
Installation Docker CE
yum install -y docker-ce
Docker start the service and set the boot
systemctl start docker
systemctl enable docker
docker Mirror acceleration (address provided by Ali cloud follow-up may vary):
Register Login https://dev.aliyun.com
Access: https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors show the following screenshot:
View docker environment and related
docker info docker version
View container running
docker ps
Install nginx example -it parameters: default running in the foreground
docker run -it nginx
Nginx into the container
id bash docker exec -it container