CentOS7 installing docker, running Nginx image, CentOS image

Source: Internet
Author: User
Tags docker ps

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.