Putting the infrastructure on Docker
Our infrastructure is ready and it enables us to develop the application. We can create a Docker compose file to spin up the infrastructure services; during the development life cycle, components such as Eureka, Config Server, Trace Server, and API Gateway do not suffer changes because they interact as an infrastructure.
Then, it enables us to create component images and use them in the docker-compose.yaml
file. Let's list our components:
- Config Server
- Eureka
- Zipkin
- RabbitMQ
- Redis
We know how to create Docker images using the Fabric8 Maven plugin, we have done this several times in the previous chapters – let's do it.
Let's configure one as an example, keep in mind we need do the same configuration for all projects, Eureka, Gateway, Config Server, and Gateway. The following snippet configures the docker-maven-plugin
to generate a Docker image:
<plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId>...