title: Docker container binds to port, but I am unable to ping it
body: <p>I have a running Docker container (from <a href="https://index.docker.io/u/alexeiled/docker-oracle-xe-11g/" rel="noreferrer">this</a> image). The container seems to be running correctly as far as I can see (the log-files are looking good and can connect via SSH to container and use SQLPlus inside it). However, I am unable to connect to the container from my host. </p>
  
  <p>I started the container like this: </p>
  
  <pre><code>sudo docker run -d -p 49160:22 -p 49161:1521 -p 49162:8080 alexeiled/docker-oracle-xe-11g
  </code></pre>
  
  <p>I inspected the port-binding by this:</p>
  
  <pre><code>$ sudo docker port &lt;container&gt; 8080
  0.0.0.0:49162
  </code></pre>
  
  <p>And when I do a <code>sudo docker inspect &lt;container&gt;</code> I get among others this:</p>
  
  <pre><code>"NetworkSettings": {
      "IPAddress": "172.17.0.2",
      "IPPrefixLen": 16,
      "Gateway": "172.17.42.1",
      "Bridge": "docker0",
      "PortMapping": null,
      "Ports": {
          "1521/tcp": [
              {
                  "HostIp": "0.0.0.0",
                  "HostPort": "49161"
              }
          ],
          "22/tcp": [
              {
                  "HostIp": "0.0.0.0",
                  "HostPort": "49160"
              }
          ],
          "8080/tcp": [
              {
                  "HostIp": "0.0.0.0",
                  "HostPort": "49162"
              }
          ]
      }
  },
  </code></pre>
  
  <p>When I try to ping the container, the container responds:</p>
  
  <pre><code>$ ping 172.17.0.2
  PING 172.17.0.2 (172.17.0.2) 56(84) bytes of data.
  64 bytes from 172.17.0.2: icmp_req=1 ttl=64 time=0.138 ms
  64 bytes from 172.17.0.2: icmp_req=2 ttl=64 time=0.132 ms
  </code></pre>
  
  <p><strong>But I cannot connect from my host (Windows) to the Docker container</strong>. I am running Docker inside a Ubuntu 12.04 virtual machine (in VirtualBox on Windows). I am not sure if it is a problem with Docker, with my Linux VM or with VirtualBox. I forwarded a bunch ports in VirtualBox:</p>
  
  <p><img src="https://i.stack.imgur.com/JX8Uy.png" alt="enter image description here"></p>
  
  <p>This is the result of <code>sudo netstat -tpla</code>:</p>
  
  <pre><code>Active Internet connections (servers and established)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
  tcp        0      0 *:sunrpc                *:*                     LISTEN      542/rpcbind
  tcp        0      0 *:ssh                   *:*                     LISTEN      1661/sshd
  tcp        0      0 *:51201                 *:*                     LISTEN      831/rpc.statd
  tcp        0     80 docker:ssh              10.0.2.2:62220          ESTABLISHED 1902/sshd: vagrant
  tcp6       0      0 [::]:49160              [::]:*                  LISTEN      2388/docker
  tcp6       0      0 [::]:49161              [::]:*                  LISTEN      2388/docker
  tcp6       0      0 [::]:56105              [::]:*                  LISTEN      831/rpc.statd
  tcp6       0      0 [::]:49162              [::]:*                  LISTEN      2388/docker
  tcp6       0      0 [::]:sunrpc             [::]:*                  LISTEN      542/rpcbind
  tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      1661/sshd
  </code></pre>
  
  <p><strong>Any idea why I cannot connect from Windows to my (running) Docker container?</strong></p>