请教大神,go-micro v2开发的项目如何部署到docker上,我部署后总是408报错,
这个是简单的代码
```go
func (h Handler) WebApiListByUser(ctx context.Context, user *pb.SysUser, resp *pb.PageResp) error {
panic("implement me")
}
```
本地正常访问的话它会返回500错误提示implement me,但是部署到docker就报错408了
下面是我的dockerfile
```Dockerfile
FROM alpine:latest
RUN mkdir /app
WORKDIR /app
COPY ./build /app
EXPOSE 8700
ENTRYPOINT ["./server"]
```
`docker build -t test .`
创建容器
`docker run -it -d --name test -p 8700:8700 test`
正常启动了,在etcd和micro web下也能看到该服务已注册,
但是调用接口服务时候就一直报错408![image.png](https://static.studygolang.com/210104/ccf33bc8cc9e75733e47d92296a10980.png)
![image.png](https://static.studygolang.com/210104/6e583abae927be785fbb44a67a7902b0.png)
```cmd
C:\Users\Administrator>micro health test
service test
version v1
node address:port status
test-6f672712-c326-4e67-bcbf-6166ba7adddc 172.17.0.4:8700 {"id":"go.micro.client","code":408,"detail":"context deadline exceeded","status":"Request Timeout"}
```
有疑问加站长微信联系(非本文作者)