Docker y Docker Compose
The information provided below is intended to be complementary to the project script and is not required reading.
Motivation
Instead of installing the programs directly in the virtual machine that you will create, you will have to deploy them in isolated software containers (containers). These containers are units of software that package code so that applications work in isolation without the need to use multiple virtual machines.
Docker
Docker is an open source project for automating the deployment of applications as self-contained, portable containers that can be run in the cloud or on-premises. Docker is also a company (Docker Inc.) that promotes and promotes this technology.
Docker technology uses the Linux kernel (the common base shared by Ubuntu, Debian, Mint, etc.) to segregate processes so they can run independently in containers, in order to make better use of available hardware. and retain the security that a solution where processes run on separate physical systems would offer.
The container tools offer a deployment model based on images, which are static representations of an application or service and its configuration and dependencies. To run the application or service, an instance of the application image is created to create a container, which in our case will run on the virtual machine. Docker Hub is a public registry where any developer can upload an image containing the software they have built. By default, Docker looks for the image that is indicated in this registry. In the case of a specific application, it is common to find an image for each commercial version of the application. This allows containers to run specific software versions regardless of the hardware being used, and even multiple versions of the same program to run simultaneously without compatibility errors.
The tags are labels that allow different instances that have been created from the same image to be differentiated. These images are generated locally using the build command from a DockerFile file, which allows you to define a series of instructions that will be executed at the moment of creating an image.
In the screenshot that appears on the next page, which corresponds to the docker-compose file that is provided to you to generate the containers that you will need in the project, it is indicated that the image that is going to be used is a Node-RED image that we have identified with the tag “1.3.0”.
You can find all the information regarding Docker (terminology and technical aspects) in the following links. The first link leads to the Microsoft Docker documentation while the second link leads to the official Docker documentation.
https://docs.microsoft.com/es-es/dotnet/architecture/containerized-lifecycle/
Docker Compose
Docker Compose is a tool to define and run multi-container solutions, which uses YAML files to configure the different applications (one for each container) and carries out the process of creating and starting the containers with just one command (docker-compose up). The YAML file that is written for each solution is also called docker-compose.
The following figure, which is a cutout of the docker-compose file that you will use in the project, shows how a specific service is defined, in this case Node-RED:
- In image it is indicated which image will be used from Node-RED. In this case it is not an image taken from the official Node-RED repository; It is an image generated based on the image of version 1.8.4-alpine of Node-RED on which the packages you will need have been installed.
- In environment, in this case, only the time zone is indicated.
- In ports, the correspondence between ports is indicated (the first being that of the virtual machine and the second being that of the container).
- In networks, it is indicated which IP address this container will take in the internal network that will form all the containers generated through this docker-compose file.
- In volumes it is indicated where the generated data should be stored once the container is turned off. If that was not done, the data would be lost since the containers are generated each time as a new instance of an image.

You can find all the documentation regarding Docker Compose at the following link: