title: How to access the webpage in Nginx docker container from outside the host machine using publicIp of host?
body: <p>I am new to docker networking and i am not able to figure out why i cant access the webpage for nginx container hosted in a linux machine as host. if i try to access it from other machine such a windows machine using a public ip, it doesnt connect. Am i missin something here?</p>
  <p>this is my <code>docker network inpsect bridge</code></p>
  <pre><code>``` [
  {
      &quot;Name&quot;: &quot;bridge&quot;,
      &quot;Id&quot;: &quot;fcf42bd67c4104ec2f58a57a7db7fe3b623938cc4ece696dfd04a6ff5ab122c9&quot;,
      &quot;Created&quot;: &quot;2021-09-19T10:50:12.231201531+05:30&quot;,
      &quot;Scope&quot;: &quot;local&quot;,
      &quot;Driver&quot;: &quot;bridge&quot;,
      &quot;EnableIPv6&quot;: false,
      &quot;IPAM&quot;: {
          &quot;Driver&quot;: &quot;default&quot;,
          &quot;Options&quot;: null,
          &quot;Config&quot;: [
              {
                  &quot;Subnet&quot;: &quot;172.17.0.0/16&quot;,
                  &quot;Gateway&quot;: &quot;172.17.0.1&quot;
              }
          ]
      },
      &quot;Internal&quot;: false,
      &quot;Attachable&quot;: false,
      &quot;Ingress&quot;: false,
      &quot;ConfigFrom&quot;: {
          &quot;Network&quot;: &quot;&quot;
      },
      &quot;ConfigOnly&quot;: false,
      &quot;Containers&quot;: {
          &quot;3d0a83398f1672da98a38d8962e0edba56d726c901a1f01e3593328b29fac191&quot;: {
              &quot;Name&quot;: &quot;nginx2&quot;,
              &quot;EndpointID&quot;: &quot;2e764b0a1269128b784f3d9b0bc9c9a97165b09c46ae4b666613fa84b82cdad9&quot;,
              &quot;MacAddress&quot;: &quot;02:42:ac:11:00:02&quot;,
              &quot;IPv4Address&quot;: &quot;172.17.0.2/16&quot;,
              &quot;IPv6Address&quot;: &quot;&quot;
          }
      },
      &quot;Options&quot;: {
          &quot;com.docker.network.bridge.default_bridge&quot;: &quot;true&quot;,
          &quot;com.docker.network.bridge.enable_icc&quot;: &quot;true&quot;,
          &quot;com.docker.network.bridge.enable_ip_masquerade&quot;: &quot;true&quot;,
          &quot;com.docker.network.bridge.host_binding_ipv4&quot;: &quot;0.0.0.0&quot;,
          &quot;com.docker.network.bridge.name&quot;: &quot;docker0&quot;,
          &quot;com.docker.network.driver.mtu&quot;: &quot;1500&quot;
      },
      &quot;Labels&quot;: {}
  }
  </code></pre>
  <p>] ```</p>
  <p>this is my <code>docker conatiner ls -a</code></p>
  <pre><code>CONTAINER ID   IMAGE     COMMAND                  CREATED          STATUS                      PORTS     NAMES
  3d0a83398f16   nginx     &quot;/docker-entrypoint.…&quot;   13 minutes ago   Up 13 minutes               80/tcp    nginx2
  bc563e57ba2b   nginx     &quot;/docker-entrypoint.…&quot;   26 minutes ago   Exited (0) 15 minutes ago             confident_yonath
  </code></pre>