【发布时间】:2020-01-18 16:38:11
【问题描述】:
我在本地的 docker setup 中运行一个应用程序 [在 Mac 中使用 homebrew 安装了 docker]。
我从邮递员那里得到Could not get any response,或者在 curl 电话中得到Empty reply from server。
我尝试了docker-machine: Can't access container's web server from host 中提到的所有解决方案,但没有一个对我有用。我不知道为什么我无法访问该 URL。
我正在附加 docker ps 和 docker-machine env 输出。
我还附上了我的 docker-compose.yml
version: '3.2'
services:
details:
image: localhost:5000/my-details-1
container_name: details
#build: ./details
expose:
- 9080
ratings:
image: localhost:5000/my-ratings-1
container_name: ratings
#build: ./ratings
expose:
- 9080
reviews:
image: localhost:5000/my-reviews-1
container_name: reviews
#build: ./reviews/reviews-wlpcfg
expose:
- 9080
restwrapjdbc:
image: localhost:5000/my-restwrapjdbc
container_name: restwrapjdbc
#build: ./RestWrapJDBC
expose:
- 8085
mirest:
image: localhost:5000/my-mirest
container_name: mirest
#build: ./MIRest
#network_mode: "host"
expose:
- 8085
ports:
- target: 8085
published: 8085
protocol: tcp
mode: hosts
已编辑:
我忘记包含来自web.xml 的url-pattern。将该字符串包含到 url 中有效。
【问题讨论】:
-
我无法运行那个
docker-compose.yml文件;看起来您附加了图像而不是文件的实际内容。能不能把这两张截图删掉替换掉?
标签: docker docker-compose docker-machine