Dubbo running in Docker, packaged as a springboot application.
This demo consistes three services:
- a zookeper instance
- a service producer
- a service consumer
The service producer exposes a Greeting
service through RPC,
service consumer access the producer.
Run a docker image.
Code in service-producer. API defined in service-api.
Build docker image:
cd service-producer
mvn package
docker build -t producer .
Code in service-consumer.
Build docker image:
cd service-consumer
mvn package
docker build -t consumer .
Use docker-compose command to run it.
cd docker
docker-compose up -d
Verify that all works:
$curl http://localhost:8899/
Greetings from Dubbo Docker
Use docker/docker-compose-acs.yml to deploy this application to Aliyun Container Service (Alibaba Cloud).
2017.11.30 Update: Add compose v3 sample yml file: docker/docker-compose-v3.yml