February 2019
Intermediate to advanced
446 pages
10h 55m
English
Each microservice will have its own Docker container. Therefore, we'll use the docker-compose Docker container manager to manage our containers. You can also use Docker Swarm or Kubernetes, which are more popular and used at production environments.
Docker Compose will help us specify the number of containers and how these will be executed. We can specify the Docker image, ports, and each container's links to other Docker containers.
We'll create a file called docker-compose.yml in our root project directory and add all the microservice containers to it:
version: '3'services: restaurant-service: image: localhost:5000/sourabhh/restaurant-service:PACKT-SNAPSHOT ports: - "8080:8080" booking-service: image: localhost:5000/sourabhh/booking-service:PACKT-SNAPSHOT ...
Read now
Unlock full access