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.
mvn install // 安装依赖到本地
Build docker image:
cd service-producer
mvn package
mvn install
Code in service-consumer.
Build docker image:
cd service-consumer
mvn package
mvn install
Use docker-compose command to run it.
cd docker
docker-compose up --build
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).