docker learning summary

8 using a docker scene of
1. simplify the configuration of
the virtual machine's biggest advantage is able to run a variety of configurations different platform (software, system) on your hardware, Docker provides the same in the case of reduced overhead function. it allows you to configure the operating environment and then deploy on Code summary, Docker same configuration can be used in different environments environments, thus reducing the coupling between hardware requirements and application environment.
2. Code pipeline management
code is ultimately in the production environment deployment from the developer's machine to need to go through a lot of backbone environment. and each intermediate environment has its own slight differences, Docker to the application provides an all consistent from development to on-line environment, let lines of code a lot easier.

3. enhance the development efficiency
in different environments, the common goal of developers:
First, let development environment as close to the production environment
Second, you want to quickly setup the development environment
development environment machines are usually relatively memory small, before using the virtual, we often need to add memory machine development environment, and now Docker can easily make a few Services running in ten Docker up.

4. The isolated applications
may run different applications in a developing machine.
First, in order to reduce costs, server consolidation
two, split into a unitary low coupling a single application services (micro services architecture)
the integration server
capability Docker Docker isolated applications such multiple servers may be integrated to reduce costs. Since there is no footprint of the plurality of operating systems, and shared memory can not be used across multiple instances, Docker server consolidation can provide a better solution than the virtual machine.
6. debugging capabilities
Docker provides a lot of tools that are not necessarily only for container, but it is suitable for containers. They offer a lot of features, including the ability to set the container checkpoint, set version, see the difference between the two containers, these features can help debug Bug.
7. multi-tenant environment,
multi-tenant environments, it avoids rewriting critical applications. we are a special example of this scenario is to loT (IOT) application development a fast, easy to use multi-tenant environments. this multi-tenant code base is very complex and difficult to handle, re-planning to apply not only time consuming but also a waste of money.
use Docker, you can create an isolated environment for multiple instances of each application layer of a tenant, this is not only simple and low cost, fast Docker environment starts because of the speed, diff command is very efficient.
8. rapid deployment
Docker create a container for the process, you do not need to start an operating system, shortening the time for the second level.
You can create destruction in the data center resources without having to worry about re-starting the overhead of resource utilization data center is usually only 30%, by Docker with efficient resource allocation and resource utilization can be improved.


Disadvantages of two docker








Three docker related knowledge
Docker components (core): Mirror, container, library.

Using C / S architecture: client (program execution) → command line and API forms and waiting for the program (provided Docker service) to communicate.
Mirror: a read-only static template (framework); containing environments and applications execute code (Framework language); stratified mechanisms. We will add additional data through joint document based on the original system.
Containers: a runtime environment, running state of the mirror, the mirror is a dynamic execution performance.
Library: Use registration server (shared or private) users to store and share images, is a specific user directory to store the image.


* Docker characteristics:
* isolation: libcontainer (default container) => kernel namespace.
* Security: internal (cgroups) | container and homed host (core capacity mechanism).
* Measurability: cgroups (control group) → metrics and resource allocation (user).
* Portability: AUFS (fast update) → layer concept.
----- AUFS use as a Docker container file system that provides the benefits of:





Docker advantage (compare LXC): *
Cross-platform portability: according to uniform standards package (mirror), transmissible.
*-Oriented applications: optimized deployment of applications (design philosophy) → API, an interface and documentation (reflected).
* Version control: tracking, query, record version information (application change history) and rollback version, etc.
* component reuse: modular structures (base image) → Python (operating environment) | postgreasql (base image).
* Sharing: Public Registry Server (available for free download the source code).

Guess you like

Origin www.cnblogs.com/xiaohouye/p/11140135.html
Recommended