Docker Architecture
Docker includes three fundamental concepts:
Image: A Docker image is akin to a root file system. For instance, the official image
ubuntu:16.04
comprises the complete root file system of the minimal Ubuntu 16.04 system.Container: The relationship between an image and a container is analogous to that of a class and an instance in object-oriented programming. The image is a static definition, while the container is the entity that runs the image. Containers can be created, started, stopped, deleted, and paused.
Repository: A repository can be considered as a code control center for storing images.
Docker utilizes a client-server (C/S) architecture model and manages and creates Docker containers using remote APIs.
Docker containers are created from Docker images.
The relationship between containers and images is similar to that between objects and classes in object-oriented programming.
Docker | Object-Oriented |
---|---|
Container | Object |
Image | Class |
Concept | Description |
---|---|
Docker Image | A Docker image serves as a template for creating Docker containers, such as an Ubuntu system. |
Docker Container | A container is an independently running application or group of applications, which is the runtime entity of an image. |
Docker Client | The Docker client communicates with the Docker daemon via the command line or other tools using the Docker SDK (https://docs.docker.com/develop/sdk/). |
Docker Host | A physical or virtual machine that executes the Docker daemon and containers. |
Docker Registry | A Docker registry stores images, analogous to a code repository in code control. Docker Hub (https://hub.docker.com) offers a vast collection of images for use. A Docker registry can contain multiple repositories; each repository can include multiple tags; each tag corresponds to an image. Typically, a repository contains images of different versions of the same software, with tags often indicating the various versions. Images can be specified using the format <repository>:<tag> . If no tag is provided, latest is used by default. |
Docker Machine | Docker Machine is a command-line tool that simplifies Docker installation. It allows installation of Docker on various platforms, such as VirtualBox, Digital Ocean, and Microsoft Azure, through simple command-line instructions. |