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.

  • Controlling the Data of a Database Docker Container
  • angular2 app in nginx:stable-alpine docker image tries to GET a sockjs URL when I bind host 8080 -> container 80, but not 80->80
  • docker-compose does not load up data
  • Random GET /nginx_status call from inside docker container
  • How to export a named docker volume on a Mac?
  • Deleting docker files after uninstall

    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?

  • How to organize containers “horizontally” inside Kubernetes pods?
  • docker swarm create fails when tar can't find container file system
  • start a docker LAMP image with apache bound to non-standard port
  • “line 36: cd: HOME not set” in running Boot2Docker installed using Docker for Windows Installer v1.6.0
  • How come my kubernetes' service can't find an endpoint?
  • Making a REST Call to Endpoint in Dockers
  • 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.