Welcome to Jetson Orin NANO Developer Kit repository
01.Docker introduction
Introduction to Docker
Introduction to Docker1. 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
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 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 on the underlying operating system. The instruction sets of different CPU architectures are different, and containers built on different architectures may encounter compatibility issues.
For example, an image that only has a linux/amd64 version cannot run directly on an ARM64 host. Before pulling an image, confirm the architectures it supports; some hosts can also be configured with emulation such as QEMU, but performance and compatibility may be affected. For multi-architecture images, Docker usually selects the version matching the host automatically.
2. Images
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: Modifications made while a container is running are by default saved in the writable layer of that container, and are still retained after the container is stopped and the same container is started again; after the container is deleted, this data is lost. To reuse these modifications in a new container, commit them as a new image. Data in mounted volumes or bind-mounted directories is saved independently of the image and of the container's writable layer.
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. It starts with the host and listens for 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 Advantages | Description |
|---|---|
| Consistency | Application runtime environments in containers are consistent |
| Isolation | Containers are isolated from each other, ensuring the security and stability of applications |
| Portability | Cross-platform and easy to migrate |
| Efficiency | Shares the host OS kernel, is lighter than a traditional VM, and uses fewer resources |