Introduction to Docker and basic terminology

1. Introduction to Docker

1. What is Docker?

  • Background: Contradictions between development and operation and maintenance due to different environments (different operating systems, software environments, application configurations, etc.) DevOps
  • Each server in the cluster environment is configured with the same environment, which is too troublesome
  • Solve the problem of "It works on my machine"

Docker is an open source application container engine that allows developers to package their applications and dependencies into a portable container, and then publish it to any popular Linux machine, which can also be virtualized.
Alibaba Cloud, Baidu Cloud, etc. all support Docker technology

Official website: https://www.docker.com/
Chinese official website: http://www.dockercn.com/

2. Docker role

Docker is a container technology, using Docker can:

  • Install and configure the software environment, package it into an image, and then publish the image (Docker warehouse)
  • Other users can download this image in the warehouse
  • Run this image through Docker, you can get the same environment (container)

Docker simplifies environment deployment and configuration, realizes "build once, run everywhere", and avoids exceptions caused by inconsistent operating environments

Docker can be simply regarded as a virtual machine, which can run virtual machines in various software environments, but it is different from traditional virtual machine technology

The difference between Docker container technology and traditional virtual machine technology:

  • Traditional virtual machine technology: simulate a complete operating system, first virtualize a set of hardware, then install the operating system on it, and finally run the application on the system

Disadvantages: high resource usage and slow startup

  • Docker container technology: instead of simulating a complete operating system, without hardware virtualization, it isolates the process and encapsulates it into a container. The application in the container directly uses the kernel of the host, and the containers are isolated from each other. Do not affect each other

Advantages: lighter, more efficient, fast to start, second level

2. Basic terminology

the term:

  • Docker host (Host)
    The host where the Docker program is installed and runs the Docker daemon
  • Docker image (Image) is
    a template that packages the software environment to create containers. One image can create multiple containers.
  • Docker container (Container)
    generated after running the mirror instance called containers, each operation of the mirror will produce a container, which can start, stop or remove a container using sandboxing, isolated from each other, is independently a safe
    can container Seen as a simple version of the Linux environment, including user permissions, file systems and running applications, etc.
  • The Docker repository (Repository) is
    used to store mirrors. The repository contains many mirrors, and each mirror has a different tag. Tag
    Official Repository: https://hub.docker.com/

Steps to use Docker:

  1. Install Docker
  2. Download the image corresponding to the software from the Docker warehouse
  3. Run this image, a Docker container will be generated at this time
  4. The start/stop of the container is the start/stop of the software

Guess you like

Origin blog.csdn.net/weixin_39218464/article/details/112982729