I am running an application in docker setup locally [Installed docker using homebrew in Mac].
I get Could not get any response
from postman or Empty reply from server
in curl calls.
I tried all the solutions mentioned in docker-machine: Can't access container's web server from host, but none worked for me. I am not sure why I am not able to access the URL.
I am attaching the docker ps and docker-machine env output.
I am also attaching my 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
EDITED:
I forgot to include the url-pattern
from web.xml
. Including that string to the url worked.