How to access application URL hosted in docker container?

I hosted our application inside a docker container. When I run docker ps command, it gave info like below.

CONTAINER ID        IMAGE                      COMMAND             CREATED             STATUS              PORTS                                                                                                                        NAMES
6405daf98246        rdarukumalli/testapp-master   "/bin/bash"         4 hours ago         Up 4 hours>443/tcp,>8000/tcp,>8080/tcp,>8443/tcp,>9997/tcp   insane_poincare

I am trying to access this application from my machine with the following URLs. Nothing worked so far.

  • How to change “default” docker-machine's dns settings
  • Rancher and elasticsearch Nest
  • How to port data-only volumes from one host to another?
  • version control, apt (and Docker)
  • Docker installation issues on CentOS 7.1
  • Mariadb docker container Can't connect to MySQL server on host (111 Connection refused) with Python

    However, if i give the command "curl http://localhost:8080/testapp/login.jsp" inside bash of docker container,
    I can login page html is coming.

    Can some one help me in understanding these URL mappings and what URL i need to use to access this login page outside docker container?

  • Running Nightwatch test inside docker - Selenium server doesn't start
  • Docker precheck error “code E_FAIL(0x80004005)”
  • ASP.NET Core Docker port forwarding on Ubuntu 16.10
  • How to start an LXC container inside a Docker container
  • Docker image for aspNet core hangs on windows
  • Amazon ECS private DockerHub repo: Unable to decode provided docker credentials error
  • One Solution collect form web for “How to access application URL hosted in docker container?”

    Try curl http://localhost:32795/testapp/login.jsp.

    Your docker ps shows that container’s port 8080 is bound to external port 32795 : [...]>8080/tcp [...]

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.