Hi, I am new to Docker. Recently I want to test the availability web service (which is Java Spring Boot program) in local and Docker swarm. In the program, I specify port 8080 for the Tomcat, so it will return the status code (200) in postman. However, when I try to put the program to the docker swarm, I can’t test the web service by typing this in postman:
127.0.0.1:8080/servicename/
Then I tried other way, which is use the ip of the container, but still no luck
For the docker swarm setting, I use a windows to init, and using localhost to run:
docker swarm init --advertise-addr=127.0.0.1 --listen-addr 127.0.0.1
docker service create --replicas 1 -p 80:80 --name test --mount source=afdiavol,target=/hia_ai_ms hijk/testing123:2.0.3.4t
Does any one have idea to test the web service which is inside the docker swarm service with postman?