go-micro部署Docker
创建Dockerfile
1 | vim Dockerfile |
1 | FROM golang:latest |
构建
1 | docker build -t go-micro-helloworld . |
运行
1 | docker run -d -p 8080:8080 go-micro-helloworld |
测试
1 | curl -XPOST -H 'Content-Type: application/json' -H 'Micro-Endpoint: Helloworld.Call' -d '{"name": "John"}' http://localhost:8080 |



