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.
Currently, it may not be possible to pull Docker images online in China, so the tutorial is only for demonstration
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 Features | Description |
---|---|
Lightweight | Containers share the kernel of the host operating system |
Independence | Containers are isolated from each other and have their own file system, process space, and network interface |
Portability | Containers 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.)
An image is a read-only template used to create containers.
Image Features | Description |
---|---|
Immutability | Images are read-only and will not change once created |
Layered Structure | Images 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
The Docker engine is a client-server application that includes a Docker daemon, a REST API, and a command line interface (CLI).
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.
Provides command-line tools for interacting with the Docker daemon.
Docker Hub is a public cloud registry for storing and distributing Docker images.
Docker is a powerful tool that changes the way applications are developed, deployed, and run.
Main advantages | Description |
---|---|
Consistency | The application running environment in the container is consistent |
Isolation | Containers are isolated from each other to ensure the security and stability of applications |
Portability | Cross-platform, easy to migrate |
Efficiency | Shared operating system kernel, lighter than traditional virtual machines, occupies less resources |