DockerContainer port mapping error when running a custom java app

DockerContainer port mapping error when running a custom server

I am trying to run a java app in a docker container with Websphere liberty profile as the app-server with the container ports exposed in the image.

If I run the server with no app deployed (and hence deploy the default container app/context and rest/apis), the port mappings from work fine and a rest request from to the host port(mapped to the container port) accepts connections.

But, when I deploy my app, the port mapping breaks and request to the host port returns a connection-reset, although request from inside the container(to the localhost container port) works fine.

I don’t have any custom networks deployed and I guess the container runs on the default bridge network. My app should not be a problem as it accepts requests made from inside the container.

Any suggestions why this would be happening ? any tips on how to triage/resolve this ?

docker run -it --name test -p 7777:9443 -p 8888:9080 bonuspayout.results.api