Docker consists of three basic concepts:
- Image: Docker Image, which is equivalent to a root file system. For example, the official ubuntu:20.04 image includes a complete set of root files for ubuntu 20.04’s minimum system.
- Container: The relationship between an Image and a Container is similar to that between a class and an instance in object-oriented programming. An Image is a static definition and a Container is an entity of the Image runtime. Containers can be created, started, stopped, deleted, paused, and so on.
- Repository: A Repository can be thought of as a code control center that holds images.
Docker uses a client-server (C/S) architecture pattern that uses remote apis to manage and create Docker containers. Docker containers are created by Docker images. The relationship between containers and images is similar to that between objects and classes in object-oriented programming.
Docker | object-oriented |
---|---|
The container | object |
The mirror | class |
concept | instructions |
---|---|
Docker image (Images) | Docker images are templates used to create Docker containers, such as Ubuntu systems. |
Docker Container (Container) | A container is an application or group of applications that run independently and is an entity of the mirror runtime. |
Docker Client | Docker client through command line or other tools using the Docker SDK (Docs.docker.com/develop/sdk…Communicates with the Docker daemon. |
Docker Host (Host) | A physical or virtual machine for executing Docker daemons and containers. |
Docker Registry | Docker repository is used to store images, which can be understood as code repository in code control. Docker Hub(hub.docker.com) provides a large set of mirrors for use. A Docker Registry can contain multiple repositories. Each repository can contain multiple tags; Each label corresponds to a mirror. Typically, a repository contains images of different versions of the same software, and labels are often used to match versions of the software. We can specify which version of this software is the mirror by using the format < repository >:< tag >. If no label is given, latest is used as the default label. |
Docker Machine | Docker Machine is a command line tool to simplify the installation of Docker, through a simple command line can be installed on the corresponding platform Docker, such as VirtualBox, Digital Ocean, Microsoft Azure. |