Learn docker with me (1)--acquaintance

Recently, I started to learn docker by myself, and decided to share my learning progress with everyone. I hope to help the beginners of docker every day. Everyone actively leave a message, the output decides the input! It is expected to complete the explanation of docker 20 times.

1. What is docker

Docker is an open source project that was born in early 2013 as a side project within the dotCloud company. It is implemented based on the Go language introduced by Google. The project later joined the Linux Foundation, complies with the Apache 2.0 agreement, and the project code is maintained on GitHub.

Docker has been widely concerned and discussed since it was open sourced, so that dotCloud company later changed its name to Docker Inc. Redhat has centrally supported Docker in its RHEL6.5; Google is also widely used in its PaaS offering.

The main goals of Docker:

Through the management of the life cycle of application components, such as packaging, distribution, deployment, and operation, the application-level packaging can be achieved once and run everywhere.

Tips: The application component here can be a WEB application, a set of database services, or even an operating system compiler.

2. Why use docker

Advantages of Docker container virtualization

environmental isolation;

Resource isolation is achieved through cgroups and namesapce, so that one machine can run multiple containers without affecting each other.

Faster delivery and deployment;

Using docker, developers can use images to quickly build a standard R&D environment; after development is complete, test and operation and maintenance personnel can deploy code directly by using the same environment. Docker can quickly create and delete containers, achieve rapid iteration, and save a lot of time in development, testing, and deployment. Moreover, each step has a clear configuration and operation, and the whole process is explained in the company's documentation, which makes it easier for the team to understand the process of application creation and work.

more efficient use of resources;

The operation of docker containers does not require the support of additional hypervisors. It is a kernel-level virtualization that can achieve higher performance while requiring very little additional resources.

Easier to migrate and expand;

Docker containers can run on almost any platform, including Uliji, virtual machines, public clouds, private clouds, personal computers, servers, etc. This compatibility allows users to easily migrate applications between different platforms.

Easier update management.

Using Dockerfile, only a small configuration modification is required to replace a large number of update work in the past. And all modifications are distributed and updated incrementally, enabling automated and efficient container management.

3. Virtualization and docker

Definition of virtualization: Virtualization is a resource management technology that abstracts and transforms various physical resources of a computer, such as servers, networks, memory, and storage, to break the inseparable barriers between physical structures. Enable users to apply these resources in a better way than the original configuration. The new virtual portion of these resources is not limited by how existing resources are set up, geographically or physically. Commonly referred to as virtualized resources include computing power and data storage.

System virtualization, Hypervisor Virtualization, full virtualization. In the Host, multiple GuestOS are installed through the Hypervisor layer. Each GuestOS has its own kernel. Different from the host's kernel, the GuestOSs are completely isolated.

Container virtualization, Operating System Virtualization, uses namespaces and cgroups in the Linux kernel to isolate process groups. The isolation is achieved with kernel technology, so it is a virtualization technology that shares the kernel.

Container virtualization does not have GuestOS, and the image downloaded when using Docker is only a dependent environment for running the App, which is a reduced version of the system image. In general, system virtualization is not as efficient as container virtualization, but system security is much higher.

Advantages:

You can open 10 virtual machines on one machine. If you use docker to open 100 containers, it is so domineering

4. docker official website registration

Register a docker account: https://hub.docker.com/

After completing the registration, the QQ mailbox I used took 10 minutes to receive

After receiving, activate the mailbox and log in

logged in


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324747589&siteId=291194637