3. What components are there?
The Docker platform consists of a number of components, of which Docker Desktop and Docker Engine are two important parts. Docker images define the content of containers. Docker containers are executable instances of images. The Docker daemon is a background application that manages and runs Docker images and containers. The Docker Client is a command line interface (CLI) that calls the API of the Docker Daemon. Docker registries contain images, and Docker Hub is a widely used public registry. Much of Docker (but not Desktop) is open source under the Apache V2 licence.
While most Docker components are available for Windows, Mac and Linux, and despite the fact that most Docker containers run on Linux, Desktop is only available for Windows and Mac. Docker Desktop is a GUI (Graphical User Interface) tool that essentially covers a virtual machine installation. This virtual machine is not necessary on Linux, as the Docker Engine can be run directly here. Docker Desktop is used on Windows and Mac to manage various Docker components and functions, including containers, images, volumes (storage attached to containers), local Kubernetes (an automation of deployment, scaling and management of container applications), development environments within containers and more.
3.2 Docker-Images / Docker-Registry
A Docker image is an immutable file that is essentially a snapshot of a container. Images are created with the “build” command and create a container when started with “run”. Images are stored in a Docker registry such as “registry.hub.docker.com”. They are designed so that they can consist of several layers of other images, so that only a small amount of data needs to be transferred when images are sent over the network.
If one were to speak in the language of programmers, an image would be a class and a container would be an instance of a class – a runtime object. Containers are the reason why Docker is used in so many ways: They are lightweight and portable encapsulations of an environment in which applications can be run (see also “What exactly is a Docker container?“).
Let’s first take a look at the Docker Engine and its components so we have a basic idea of how the system works. With the Docker Engine, you can develop, assemble, deliver and run applications using the following components:
3.4.1 Docker Daemon
A persistent background process that manages Docker images, containers, networks and storage volumes. The Docker daemon constantly “watches” for Docker API requests and processes them.
3.4.2 Docker Engine REST API
An API used by applications to interact with the Docker daemon; it can be accessed via an HTTP client.
3.4.3 Docker Client / Docker CLI
The Docker client allows users to interact with Docker. It can be on the same host as the daemon or connect to a daemon on a remote host and communicate with more than one daemon. The Docker Client provides a command line interface (CLI = Command Line Interpreter) through which you can issue commands to a Docker daemon to create, run and stop applications.
The main purpose of the Docker Client is to provide a means to pull images from a registry and run them on a Docker host. Common commands issued by a client are:
- docker build
- docker pull
- docker run
To simplify the work with Docker commands, the free, intuitive and easy-to-implement GUI (Graphical User Interface) Portainer is often the first choice. The administration of Docker Engines and the complete management can be perfectly enabled with Portainer, even for small Docker projects. Hardware information such as the number of processors and the size of the RAM, as well as Docker-specific information (number of containers, images, volumes and networks) are visible at a glance. Thus, the Docker tool with its clear web interface can easily take over the standard Docker functions and administration.
Kubernetes is an open source system that uses process automation to manage containers and therefore works hand-in-hand with Docker. The configuration data is transferred to Kubernetes in a Helm Chart. There, it will be configured which containers are to be rolled out, monitored and managed. Kubernetes solves this task easily even with a high number of containers.
In addition, Kubernetes can make perfect use of resources. Machines that are not needed can either be switched off or reassigned to other tasks to save costs and capacities.
The OPC Router is also aware of the working connection between Kubernetes and Docker. The OPC Router is compatible with Kubernetes and provides corresponding helmet charts. For example, the OPC Router Docker Sample, which processes data from an OPC UA server, transfers it to an MS SQL server and visualizes this data in a Grafana dashboard (OPC Router Docker Sample at Github).