title: Access jboss 8080 port inside docker container
body: <p>I'm running jboss5 in centos6.7 docker contrainer.</p>
  
  <p>JBoss running using <code>run.sh -b 0.0.0.0</code> command
  Container running using <code>docker run -i -t -p 8080:8080 my/jboss /bin/bash</code></p>
  
  <p>This is what I see in container</p>
  
  <pre><code>[root@e44f2bbab31a bin]# netstat -alnt
  Active Internet connections (servers and established)
  Proto Recv-Q Send-Q Local Address               Foreign Address             State      
  tcp        0      0 0.0.0.0:8009                0.0.0.0:*                   LISTEN         
  tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN      
  tcp        0      0 0.0.0.0:8083                0.0.0.0:*                   LISTEN 
  </code></pre>
  
  <p>This is what I see on host</p>
  
  <pre><code>15:04:17:(~)$ sudo docker ps
  [sudo] password for c0rp: 
  CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS              PORTS                    NAMES
  e44f2bbab31a        my/jboss          "/bin/bash"         4 hours ago         Up 4 hours          0.0.0.0:8080-&gt;8080/tcp   thirsty_franklin
  </code></pre>
  
  <p>When I'm trying to access jboss application from host by <code>localhost:8080</code> I see <code>ERROR 404: Not Found.</code></p>
  
  <p>When I'm checking localhost:8080 from inside container using <code>wget</code> I see same error <code>ERROR 404: Not Found.</code></p>
  
  <p>Everything is ok if I'm using ip address of container. Question is how can I bind host localhost:8080 to container ip_address:8080 ?</p>