@@ -4,7 +4,7 @@ In simple terms, Docker is a software platform that simplifies the process of bu
4
4
managing and distributing applications. It does this by virtualizing the operating system of the
5
5
computer on which it is installed and running.
6
6
7
- # The Problem
7
+ ## The Problem
8
8
Let’s say you have three different Python-based applications that you plan to host on a single server
9
9
(which could either be a physical or a virtual machine).
10
10
@@ -14,7 +14,7 @@ libraries and dependencies, differ from one application to another.
14
14
Since we cannot have different versions of Python installed on the same machine, this prevents us from
15
15
hosting all three applications on the same computer.
16
16
17
- # The Solution
17
+ ## The Solution
18
18
Let’s look at how we could solve this problem without making use of Docker. In such a scenario, we
19
19
could solve this problem either by having three physical machines, or a single physical machine, which
20
20
is powerful enough to host and run three virtual machines on it.
@@ -34,7 +34,7 @@ This allows each container to be isolated from the other present on the same hos
34
34
multiple containers with different application requirements and dependencies to run on the same host,
35
35
as long as they have the same operating system requirements.
36
36
37
- # Docker Terminology
37
+ ## Docker Terminology
38
38
39
39
Docker Images and Docker Containers are the two essential things that you will come across daily while
40
40
working with Docker.
@@ -45,7 +45,7 @@ required to run that application on Docker.
45
45
On the other hand, as stated earlier, a Docker Container is a logical entity. In more precise terms,
46
46
it is a running instance of the Docker Image.
47
47
48
- # What is Docker-Compose?
48
+ ## What is Docker-Compose?
49
49
50
50
Docker Compose provides a way to orchestrate multiple containers that work together. Docker compose
51
51
is a simple yet powerful tool that is used to run multiple containers as a single service.
@@ -56,21 +56,21 @@ each separately. It wires up the networks (literally), mounts all volumes and ex
56
56
57
57
The IOTstack with the templates and menu is a generator for that docker-compose service descriptor.
58
58
59
- # How Docker Compose Works?
59
+ ## How Docker Compose Works?
60
60
61
61
use yaml files to configure application services (docker-compose.yaml)
62
62
can start all the services with a single command ( docker-compose up )
63
63
can stop all the service with a single command ( docker-compose down )
64
64
65
- # How are the containers connected
65
+ ## How are the containers connected
66
66
The containers are automagically connected when we run the stack with docker-compose up.
67
67
The containers using same logical network (by default) where the instances can access each other with the instance
68
68
logical name. Means if there is an instance called * mosquitto* and an * openhab* , when openHAB instance need
69
69
to access mqtt on that case the domain name of mosquitto will be resolved as the runnuning instance of mosquitto.
70
70
71
- # How the container are connected to host machine
71
+ ## How the container are connected to host machine
72
72
73
- ## Volumes
73
+ ### Volumes
74
74
75
75
The containers are enclosed processes which state are lost with the restart of container. To be able to
76
76
persist states volumes (images or directories) can be used to share data with the host.
@@ -89,7 +89,7 @@ Volumes are the preferred mechanism for persisting data generated by and used by
89
89
While bind mounts are dependent on the directory structure of the host machine, volumes are completely
90
90
managed by Docker. In IOTstack project uses the volumes directory in general to bind these container volumes.
91
91
92
- ## Ports
92
+ ### Ports
93
93
When containers running a we would like to delegate some services to the outside world, for example
94
94
OpenHAB web frontend have to be accessible for users. There are several ways to achive that. One is
95
95
mounting the port to the most machine, this called port binding. On that case service will have a dedicated
0 commit comments