Docker introduction

Docker introduction1. Containers2. Images3. Docker Engine3.1. Docker Daemon3.2、Docker CLI4、Docker Hub5、Main advantages of Docker

Docker is an open source platform for developing, deploying, and running applications. Through container technology, developers can create consistent, portable, and scalable application environments, improving development efficiency and application reliability.

1. Containers

A Docker container is a lightweight, independent executable software package that contains everything needed to run an application: code, runtime, system tools, system libraries, and settings.

Container FeaturesDescription
LightweightContainers share the kernel of the host operating system
IndependenceContainers are isolated from each other and have their own file system, process space, and network interface
PortabilityContainers can run on any platform that supports Docker

Note: Docker containers are built based on the underlying operating system. The instruction sets of different CPU architectures are different, and containers built on different architectures may encounter compatibility issues.

Example: Containers built for AMD64 architecture (modern computers) cannot run on ARM64 architecture (Raspberry Pi, Jetson, etc.)

2. Images

An image is a read-only template used to create containers.

Image FeaturesDescription
ImmutabilityImages are read-only and will not change once created
Layered StructureImages consist of multiple layers, each of which represents a state of the image

Note: To create a container through an image, the modified content of the container needs to be resubmitted to take effect

3. Docker Engine

The Docker engine is a client-server application that includes a Docker daemon, a REST API, and a command line interface (CLI).

3.1. Docker Daemon

Responsible for building, running, and managing containers: runs as a background service, starts when the host starts, and runs in the background, listening to Docker API requests.

3.2、Docker CLI

Provides command-line tools for interacting with the Docker daemon.

4、Docker Hub

Docker Hub is a public cloud registry for storing and distributing Docker images.

5、Main advantages of Docker

Docker is a powerful tool that changes the way applications are developed, deployed, and run.

Main advantagesDescription
ConsistencyThe application running environment in the container is consistent
IsolationContainers are isolated from each other to ensure the security and stability of applications
PortabilityCross-platform, easy to migrate
EfficiencyShared operating system kernel, lighter than traditional virtual machines, occupies less resources