I'm running a scala application in docker container:
docker build -t myapp:latest .
docker run -d -p 8081:8081 --name myapp app:latest
I can access endpoints through docker exec
docker exec -it <container hash> bash
I can then access endpoints through the curl command (on docker terminal)
curl --request GET http://localhost:8081
However in my local machine, I can't access the same curl command and expect to be able to.
Tried checking localhost port and deploying it with that in the code. DOcker ps reveals nothing is running in docker container; however I can see the curl commands coming with resposne I expect.