1, Environment, CENTOS7 Minimal 64-bit, Docker must have 64-bit system
2. Install directly via Yum command, Yum installs Docker
3. Start Docker and set it to boot
(1) Start, systemctl start Docker.service
(2) boot up, systemctl enable Docker.service
(3) Help, Docker--help
(4) Overview information, Docker info
(5) Mirror view, Docker images
(6) Container view, i.e. process view, Docker ps-a
4, install the image, you can view the official image to Https://registry.hub.docker.com/search?q=library. Image, based on the current system, Docker, the creation of a collection of files, that can be operating system, programs, such as CentOS image, Ubuntu image, MySQL image, Nginx image
5, install the program image, with Nginx as an example,
(1) Download image, Docker pull nginx:1.9
(2) Start the container, Docker run-d-P 8080:80 nginx:1.9, the container in the Nginx 80 port, map to the current server 8080 port, the current server IP is 192.168.0.191, browser input HTTP// 192.168.0.191:8080/, you can see that Nginx is started,
(3) Restart more than one container, Docker run-d-P 8081:80 nginx:1.9, browser input http://192.168.0.191:8081/, you can see another nginx has been started
(4) The difference between the Docker deployment application and the traditional deployment application can be realized here, the traditional deployment, the need to manually copy more Nginx, then configure the port, and Docker deployment, on the basis of the production of a good image, a command can be deployed a new application
6, install the system image, take Centos7 as an example, because the mirror runs, will use the current system of various resources, so the image only 60M size,
(1) Download image, Docker pull Centos:7
(2) Start the container, Docker run-i-T centos:7/bin/bash, so you can enter the CENTOS7 mirror system
7, complete.
CentOS7 installing docker, running Nginx image, CentOS image