This is the 15th day of my participation in the August Text Challenge.More challenges in August

This article is an introduction for beginners. It introduces the content that docker should master and the basic concepts and principles of Docker.

Only by understanding these contents first and then systematically learning docker, can we achieve better results. Now, let’s start docker learning with Xiao Jiu!

about

**[Docker]** is an open platform for developing, delivering, and running applications. Docker enables you to separate your applications from your infrastructure, allowing you to deliver software quickly.

With Docker, you can manage your infrastructure the same way you manage your applications. By leveraging Docker’s approach to quickly deliver, test, and deploy code, you can greatly reduce the latency between writing code and running it in a production environment.

Docker needs to focus on the following aspects:

  • Core principles
  • Basic three major pieces: mirror, container, warehouse
  • Image production: Orchestrates the resources required by the image through a Dockerfile
  • Persistent storage: Storing the container’s data on the host disk
  • Ports and interconnections: container to host, container to container, container to external connection and communication mechanism
  • User permissions: The relationship between users in the container and users on the host
  • Choreography: Implement the required business scenarios through interconnection of multiple containers

The official Docker document is a perfect and hierarchical Labour of new Window.

concept

Docker is a virtualization technology that uses the Linux virtual isolation technology (Namespace) to divide the operating system into multiple sub-operating systems. The sub-operating systems do not interfere with each other.

Why Docker technology? There are two main reasons:

  • Software architecture is complex and it is common for an application to be supported by multiple virtual machines (also known as microservitization).
  • Traditional operating systems are bulky (taking up about 10 GB of storage space) and slow to boot (about 20 seconds).

In other words, today’s system architecture requires a large number of lightweight virtual machines that run extremely fast and consume very few resources.

The appearance of Docker just solved the above problems. Lightweight virtual machines changed the system architecture, and cloud native was born here.

The principle of

The core principle of Docker can be summarized into two points: virtual file system + virtual user.

What does that mean?

  • A virtual file system is essentially a file on the host, but with virtualisation becomes an “exclusive” resource.
  • Virtual users are essentially users on the host machine, but virtualisation allows the container to think of itself as having separate user management.

Virtualization alone is not enough; isolation is technically necessary to ensure that containers do not interfere with each other.

Docker is a virtual combination of operating system resources to form a new bounded sub-operating system.

Back to clarify two concepts:

  • Host machine: The virtual machine running Docker system is called host machine
  • Containers: Lightweight virtual machines created by Docker, called containers

From the perspective of application, container and host are not dependent, but parallel

The Docker container is a real virtual machine, which is the key to understanding containers.

Container VMS have all the functions and operation modes of traditional VMS. Only in this way can container VMS learn from the technical principles of VMS.

The essence of the container is also used to run software. Since it is used to run software, it also needs to:

  • Installation Base Environment
  • Interconnect with the outside
  • Be visited by the outside world
  • Store the data
  • Store the code
  • High availability
  • Load balancing

With that in mind, let’s start our learning journey with Docker!

Small nine will continue to update the Docker later learning tutorial ~

This article is originally published by Websoft9.