What exactly is Docker? talk about my simple understanding

Why is there Docker

A product goes from development to launch, from operating system, to operating environment, to application configuration. As a collaboration between development + operation and maintenance, we need to care about many things. This is also a problem that many Internet companies have to face, especially after the iteration of various versions, the compatibility of different version environments is very important for operation and maintenance personnel. test.

The environment configuration is so troublesome. If you change a machine, you have to do it all over again, which is time-consuming and labor-intensive. Many people are thinking, can the problem be solved fundamentally, and the software can be installed with the environment?

That is to say, when installing, copy the original environment exactly. Developers can use Docker to eliminate the "does it work on my computer" problem when collaborative coding.

The reason why Docker has developed so rapidly is also because it has given a standardized solution to this.

Before configuring an application operating environment on the server, you need to install various software, such as Java/tomcat/mysql/jdbc driver packages, etc., as well as various middleware mqtt, zookeeper, etc. How troublesome it is to install and configure these things? Not to mention, it is not yet cross-platform.

If we installed these environments on Windows, we have to reinstall them when we arrive at Linux. Moreover, even if the operating system is not crossed, it is very troublesome to transplant the application to another server with the same operating system, which is equivalent to repeated deployment.

It’s okay to have a few servers. If the leader arranges a task one day, the operation and maintenance colleagues need to deploy applications on 40 servers, and each one needs to be reconfigured to create an environment. Wouldn’t it be too busy?

Assuming that there is a set of configured family buckets, which can be run and used normally on each server, it will be much more convenient. It is traditionally believed that after software coding, development and testing, the output is the program.

In order for these programs to execute smoothly, the development team must also prepare complete deployment files so that the operation and maintenance team can deploy the application. Development needs to clearly tell the operation and maintenance deployment team to use all configuration files + all software environments.

But even so, deployment failures still often occur. The design of the Docker image makes Docker break the old concept of the past. Except for the core of the operating system through images, the system environment required to run the application is packaged from bottom to top to achieve seamless cross-platform operation of the application back to the top.

The basic concept of Docker

01 What is Docker?

①Docker is a cloud open source project based on the Go language.

②Docker's main goal is "Build, Ship and Run Any App, Anywhere", to build, install, and run any application on any platform.

That is, through the management of the life cycle of application construction, such as packaging, distribution, deployment, and operation, the user's APP and its operating environment can be "encapsulated once and run everywhere".

③The emergence of Linux container technology solves such a problem, and Docker is developed on the basis of it, running applications on Docker containers, and Docker containers are consistent on any operating system, which realizes Cross-platform, cross-server.

You only need to configure the environment once, and you can deploy it on another machine with one click, which greatly simplifies the operation.

In a word: the container virtualization technology that solves the problem of operating environment and configuration software container, facilitates continuous integration and contributes to the overall release.

02 What can Docker do?

①Differences between Docker and traditional virtualization methods:

Traditional virtual machine technology is to virtualize a set of hardware, run a complete operating system on it, and then run the required application process on the system.

The application process in the container runs directly on the kernel of the host machine. The container does not have its own kernel, and there is no hardware virtualization, because the container is lighter than the traditional virtual machine.

Each container is isolated from each other, and each container has its own file system. The processes between containers will not affect each other, and computing resources can be distinguished.

②Disadvantages of traditional virtual machines:

A lot of resources are occupied, there are many redundant steps, and the startup is slow.

③Advantages of Docker:

Lightweight, second-level fast startup speed.

Simple and easy to use.

Standard and unified packaging/deployment/running scheme.

The image supports incremental distribution and is easy to deploy.

Easy to build, suitable for automated testing and continuous integration.

03 Where can I download Docker?

Docker official website or Docker Chinese website, self-study, the next community version is fine, free to use.

04 Three elements of Docker

Mirror image, container, warehouse, how to understand these three concepts?

①Mirror is a read-only template, which can be used to create Docker containers, and one image can create many containers.

②A container is an instance created by a mirror, which can be started, started, stopped, and deleted. Each container is a platform that is isolated from each other and ensures security. You can think of a container as a simplified version of the Linux environment.

③Warehouse is a place where image files are stored centrally, and there is a difference between warehouse and warehouse registration server. There are often multiple warehouses stored on the warehouse registration server, and each warehouse contains multiple images, and each image has a different label.

Warehouses are divided into public warehouses and private warehouses. The largest public warehouse is https://hub.docker.com/, which stores a large number of images for users to download. Domestic public warehouses include Alibaba Cloud, NetEase Cloud, etc. wait.

Docker itself is a container running carrier or management engine. We package the application and configuration dependencies to form a deliverable operating environment. This packaged operating environment is like an image image file. Only through this image file can a Docker container be generated.

The image file can be regarded as the template of the container. Docker generates the instance of the container according to the image file. The same image file can produce multiple container instances running at the same time.

The container instance generated by the image file is itself a file and becomes an image file;

A container runs a service. When we need it, we can create a corresponding running instance through the Docker client, which is our container;

As for the storage, it is a place where a bunch of images are placed. We can publish the images to the storage, and pull them down from the storage when needed.

Finally: The complete software testing video tutorial below has been organized and uploaded, and friends who need it can get it by themselves [Guaranteed 100% free]

Software Testing Interview Documentation

We must study to find a high-paying job. The following interview questions are the latest interview materials from first-tier Internet companies such as Ali, Tencent, and Byte, and some Byte bosses have given authoritative answers. Finish this set The interview materials believe that everyone can find a satisfactory job.

All data acquisition

Guess you like

Origin blog.csdn.net/wx17343624830/article/details/131326416