@@ -4,7 +4,7 @@ In simple terms, Docker is a software platform that simplifies the process of bu
44managing and distributing applications. It does this by virtualizing the operating system of the
55computer on which it is installed and running.
66
7- # The Problem
7+ ## The Problem
88Let’s say you have three different Python-based applications that you plan to host on a single server
99(which could either be a physical or a virtual machine).
1010
@@ -14,7 +14,7 @@ libraries and dependencies, differ from one application to another.
1414Since we cannot have different versions of Python installed on the same machine, this prevents us from
1515hosting all three applications on the same computer.
1616
17- # The Solution
17+ ## The Solution
1818Let’s look at how we could solve this problem without making use of Docker. In such a scenario, we
1919could solve this problem either by having three physical machines, or a single physical machine, which
2020is 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
3434multiple containers with different application requirements and dependencies to run on the same host,
3535as long as they have the same operating system requirements.
3636
37- # Docker Terminology
37+ ## Docker Terminology
3838
3939Docker Images and Docker Containers are the two essential things that you will come across daily while
4040working with Docker.
@@ -45,7 +45,7 @@ required to run that application on Docker.
4545On the other hand, as stated earlier, a Docker Container is a logical entity. In more precise terms,
4646it is a running instance of the Docker Image.
4747
48- # What is Docker-Compose?
48+ ## What is Docker-Compose?
4949
5050Docker Compose provides a way to orchestrate multiple containers that work together. Docker compose
5151is 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
5656
5757The IOTstack with the templates and menu is a generator for that docker-compose service descriptor.
5858
59- # How Docker Compose Works?
59+ ## How Docker Compose Works?
6060
6161use yaml files to configure application services (docker-compose.yaml)
6262can start all the services with a single command ( docker-compose up )
6363can stop all the service with a single command ( docker-compose down )
6464
65- # How are the containers connected
65+ ## How are the containers connected
6666The containers are automagically connected when we run the stack with docker-compose up.
6767The containers using same logical network (by default) where the instances can access each other with the instance
6868logical name. Means if there is an instance called * mosquitto* and an * openhab* , when openHAB instance need
6969to access mqtt on that case the domain name of mosquitto will be resolved as the runnuning instance of mosquitto.
7070
71- # How the container are connected to host machine
71+ ## How the container are connected to host machine
7272
73- ## Volumes
73+ ### Volumes
7474
7575The containers are enclosed processes which state are lost with the restart of container. To be able to
7676persist 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
8989While bind mounts are dependent on the directory structure of the host machine, volumes are completely
9090managed by Docker. In IOTstack project uses the volumes directory in general to bind these container volumes.
9191
92- ## Ports
92+ ### Ports
9393When containers running a we would like to delegate some services to the outside world, for example
9494OpenHAB web frontend have to be accessible for users. There are several ways to achive that. One is
9595mounting the port to the most machine, this called port binding. On that case service will have a dedicated
0 commit comments