docker Overview and Installation

I. Overview

Docker is an application container engine open source, so developers can package their applications and dependencies into a portable container and then posted to any popular Linux machine or Windows machine, can be virtualized, the container is completely use the sandbox mechanism will not have any interface with each other.

A complete Docker has the following components:
  1. DockerClient client
  2. Docker Daemon Daemon
  3. Docker Image Mirror
  4. Docker Container vessel

 

 

 

The core technology of the container has the following core technologies:

        1.cgroups resource management (limit space)

        2.Namespace process isolation

        3.SElinux security

Here are a comparison chart docker container and traditional virtualization technology, it is clear to see why docker faster speed than traditional virtualization, because the operating system does not docker

That it can be understood as a program (not account for memory, cpu, speed) and this is the biggest difference between traditional virtualization

docker also has its own shortcomings

                             1. Isolation of the container is not strong virtualization

                             2. Shared Linux kernel, security birth defects

                             3.selinux restive

                             4. Monitoring container and troubleshooting

II: Installation Requirements

       1.64 operating system

       2. At least RHEL6.5 version of the above, the personal version is strongly recommended RHEL7.0

       3. Turn off the firewall (not required)

       4. The kernel version must be 3.10 or more, you can check the kernel version by command uname -r

Three: Installation docker

1. docker already installed, you need to uninstall

命令:yum -y remove docker   docker-client   docker-client-latest  docker-common   docker-latest  docker-latest-logrotate  docker-logrotate  docker-selinux   docker-engine-selinux  docker-engine  

Because I am a new virtual machine, docker history does not install

 

 2. Installation docker dependencies

命令:yum -y install yum-utils device-mapper-persistent-data lvm2

 

 

 There are two ways to download docker sources, one official, one is cloud Ali, Ali recommended to use personal cloud

Command: cd /etc/yum.repos.d/

Official website address: yum-config-Manager - the Add-repo HTTPS: //download.docker.com/linux/centos/docker-ce.repo

Ali Cloud Address: yum-config-Manager - the Add-repo HTTP: //mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

 

 

 

3. formal installation docker

命令:yum -y  install docker-ce

 

4. Start docker and testing

Command: systemctl start docker # start docker

Testing: docker run hello-world

 

 

 After executing the command docker, if the content is consistent with the following figure indicates success

 

 

Or enter ip a (ifconfig) will appear as shown, the installation is successful

 

 

to sum up:. . . . . . . Omitted here a million words

 

Guess you like

Origin www.cnblogs.com/zgqbky/p/11896766.html