A, docker description
Use docker advantages are the following:
1, faster delivery and deployment
For a project only need to create a standard set of development to build the image of the container, then the development and implementation can use this image to quickly deploy. docker can quickly create a container, fast iterative product, docker container is lightweight, start time is in seconds, and save a lot of development testing and deployment time.
2, easier migration and expansion
docker container almost allowed on any platform, this compatibility allows users to easily achieve the migration project.
3, management easier
Use docker only need small changes, you can update a lot of work instead of the past, all the modifications are distributed and updated incrementally, enabling automated and efficient management.
docker indulgence three concepts:
1, mirror
Mirroring is a read-only template files; images can be used to create a docker container.
2, container
The container is running instances created from the mirror, can run the application in a container. Between the container are isolated from each other, to ensure security.
Mirroring is read-only, read-write and the container layer is created on top of the image file.
3, warehouse
The warehouse used to store image files, the warehouse is divided into public warehouse ( Docker Hub ) and private warehouse (warehouse users on the local network created).
Build process : mirror pulled from the warehouse = "The image creation container =" application deployed on the container
Second, install docker
Environment: Centos7.4
step:
1, the installation dependencies
yum install -y yum-utils \ device-mapper-persistent-data \ lvm2
2, add the package source docker
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
3, yum update package index
yum makecache fast
4, installation docker
yum install docker-ce
5, start / restart docker
systemctl start docker
systemctl restart docker
6, unloading docker
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
7, verify proper installation
docker run hello-world
8, download and view nginx Mirror Mirror
Download the latest nginx Mirror: docker pull nginx; you can also specify the version docker pull nginx: 1.12
View currently owned mirror: docker images