The Docker role
As you remember from the previous chapters, Docker utilizes the concept of containerization. You simply put your application (in this context, the application will be a microservice) no matter what language and technology it uses, into a single, deployable and runnable piece of software, called the image. We are going to cover the process of packaging a Java application into the image in detail in the Chapter 4, Creating Java Microservices. The Docker image will contain everything our service needs to work, it can be a Java Virtual Machine with all required libraries and an application server, or it can also be a node.js
application packaged together with the node.js
runtime with all the needed node.js
modules, such as express.js
or whatever the node.js
service needs to run. A microservice might consist of two containers, one running the service code and another running a database to keep the service's own data.
Docker isolates containers to one process or service. In effect...