title: Make docker accessible in LAN
body: <p>Somehow containers_id have changed, and I have no idea of how can I add a container to this bridge to make a project running in docker available to our LAN.</p>
  
  <p>Here are my running containers:
  <a href="https://i.stack.imgur.com/PFeng.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PFeng.png" alt="enter image description here"></a></p>
  
  <p>And here is my network ls:
  <a href="https://i.stack.imgur.com/prHOE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/prHOE.png" alt="enter image description here"></a></p>
  
  <p>I'm reading all this tuto's but afraid to mess up things, can someone help me to make this project available for example, in 192.168.0.10?</p>
  
  <p><strong>[UPDATE1]: the output of netstat -tulpn</strong></p>
  
  <pre><code>netstat -tulpn
  (Not all processes could be identified, non-owned process info
   will not be shown, you would have to be root to see it all.)
  Active Internet connections (only servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
  tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
  tcp6       0      0 :::3306                 :::*                    LISTEN      -                   
  tcp6       0      0 :::80                   :::*                    LISTEN      -                   
  tcp6       0      0 :::22                   :::*                    LISTEN      -                   
  tcp6       0      0 :::443                  :::*                    LISTEN      -                   
  udp        0      0 172.18.0.1:123          0.0.0.0:*                           -                   
  udp        0      0 192.168.0.10:123        0.0.0.0:*                           -                   
  udp        0      0 127.0.0.1:123           0.0.0.0:*                           -                   
  udp        0      0 0.0.0.0:123             0.0.0.0:*                           -                   
  udp        0      0 0.0.0.0:4400            0.0.0.0:*                           -                   
  udp        0      0 0.0.0.0:49884           0.0.0.0:*                           -                   
  udp        0      0 0.0.0.0:5353            0.0.0.0:*                           -                   
  udp6       0      0 :::14324                :::*                                -                   
  udp6       0      0 fe80::34cc:82ff:fec:123 :::*                                -                   
  udp6       0      0 fe80::5036:49ff:fec:123 :::*                                -                   
  udp6       0      0 fe80::8029:1ff:fe0e:123 :::*                                -                   
  udp6       0      0 fe80::1892:d2ff:fe0:123 :::*                                -                   
  udp6       0      0 fe80::42:d1ff:fed3::123 :::*                                -                   
  udp6       0      0 2804:14d:c680:1b71::123 :::*                                -                   
  udp6       0      0 2804:14d:c680:1b71::123 :::*                                -                   
  udp6       0      0 fe80::86c2:2e62:9e5:123 :::*                                -                   
  udp6       0      0 ::1:123                 :::*                                -                   
  udp6       0      0 :::123                  :::*                                -                   
  udp6       0      0 fe80::86c2:2e62:9e5:546 :::*                                -                   
  udp6       0      0 :::58147                :::*                                -                   
  udp6       0      0 :::5353                 :::*     
  </code></pre>
  
  <p><strong>UPDATE2: docker inspect on docker_agil1_1</strong></p>
  
  <pre><code>sudo docker inspect --format '{{json .NetworkSettings}}' docker_agil1_1
  {"Bridge":"","SandboxID":"b37a7a73bf05cb215796a8b5c34ca9a1c9c2f332f3e865f974980ac5fd034bf2","HairpinMode":false,"LinkLocalIPv6Address":"","LinkLocalIPv6PrefixLen":0,"Ports":{"443/tcp":[{"HostIp":"0.0.0.0","HostPort":"443"}],"80/tcp":[{"HostIp":"0.0.0.0","HostPort":"80"}]},"SandboxKey":"/var/run/docker/netns/b37a7a73bf05","SecondaryIPAddresses":null,"SecondaryIPv6Addresses":null,"EndpointID":"","Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","MacAddress":"","Networks":{"docker_default":{"IPAMConfig":null,"Links":["docker_agil1_db_1:agil1_db_1","docker_agil1_db_1:docker_agil1_db_1","docker_agil1_db_1:mysql"],"Aliases":["e1b469ab4d66","agil1"],"NetworkID":"2889780f55a072444137855fb6c94c4df53d62f0ec51d5b09d42ec8e8d0eb372","EndpointID":"59bb683bd3a81c620492ed7ddea811d7919bbaa08a738249b6ec60e6f50f5043","Gateway":"172.18.0.1","IPAddress":"172.18.0.3","IPPrefixLen":16,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"02:42:ac:12:00:03","DriverOpts":null}}}
  </code></pre>
  
  <p><strong>Update3:</strong>
  docker network inspect docker_default:</p>
  
  <pre><code> [
      {
          "Name": "docker_default",
          "Id": "2889780f55a072444137855fb6c94c4df53d62f0ec51d5b09d42ec8e8d0eb372",
          "Created": "2017-08-24T12:00:28.615469234-03:00",
          "Scope": "local",
          "Driver": "bridge",
          "EnableIPv6": false,
          "IPAM": {
              "Driver": "default",
              "Options": null,
              "Config": [
                  {
                      "Subnet": "172.18.0.0/16",
                      "Gateway": "172.18.0.1"
                  }
              ]
          },
          "Internal": false,
          "Attachable": false,
          "Ingress": false,
          "ConfigFrom": {
              "Network": ""
          },
          "ConfigOnly": false,
          "Containers": {
              "17753e89370d03571efe42994b9e1b7300787d05132b6577721792eb1c68446a": {
                  "Name": "docker_agilapi_db_1",
                  "EndpointID": "5766d902a9447147a583795eafc23175509ee2696a001419b7fa1c9a3881ed74",
                  "MacAddress": "02:42:ac:12:00:04",
                  "IPv4Address": "172.18.0.4/16",
                  "IPv6Address": ""
              },
              "991880fa4093461f902fae7239cfe138f25eacc152687d673e109bbd0cee2f56": {
                  "Name": "docker_agil1_db_1",
                  "EndpointID": "61b2d06c62a821a25e44a85042509ecd7d58d8dbd4228b60372d181d48b6a55e",
                  "MacAddress": "02:42:ac:12:00:02",
                  "IPv4Address": "172.18.0.2/16",
                  "IPv6Address": ""
              },
              "a75bbb07436930652c2024bee20b426c1d67e95472ee4f635da57fd8370f8431": {
                  "Name": "docker_agilapi_1",
                  "EndpointID": "51fb0cdb402cd0a9aec9c97accd4028140d92509923d3023bd652a2de5d2d203",
                  "MacAddress": "02:42:ac:12:00:05",
                  "IPv4Address": "172.18.0.5/16",
                  "IPv6Address": ""
              },
              "e1b469ab4d663e2575232bfee06ef52d01c0178946e3e174b64ba2d316a3051d": {
                  "Name": "docker_agil1_1",
                  "EndpointID": "59bb683bd3a81c620492ed7ddea811d7919bbaa08a738249b6ec60e6f50f5043",
                  "MacAddress": "02:42:ac:12:00:03",
                  "IPv4Address": "172.18.0.3/16",
                  "IPv6Address": ""
              }
          },
          "Options": {},
          "Labels": {}
      }
  ]
  </code></pre>
  
  <p>sudo brctl show:</p>
  
  <pre><code> bridge name    bridge id       STP enabled interfaces
   br-2889780f55a0        8000.0242d1d3851d   no      veth081c0e3
                              veth342b2da
                              veth34fb985
                              vethe0daeb5 docker0     8000.02427e7776a8   no
  </code></pre>
  
  <p>Ifconfig -a:</p>
  
  <pre><code> br-2889780f55a0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
           inet 172.18.0.1  netmask 255.255.0.0  broadcast 0.0.0.0
           inet6 fe80::42:d1ff:fed3:851d  prefixlen 64  scopeid 0x20&lt;link&gt;
           ether 02:42:d1:d3:85:1d  txqueuelen 0  (Ethernet)
           RX packets 43  bytes 1468 (1.4 KiB)
           RX errors 0  dropped 0  overruns 0  frame 0
           TX packets 78  bytes 6534 (6.3 KiB)
           TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
   docker0: flags=4099&lt;UP,BROADCAST,MULTICAST&gt;  mtu 1500
           inet 172.17.0.1  netmask 255.255.0.0  broadcast 0.0.0.0
           ether 02:42:7e:77:76:a8  txqueuelen 0  (Ethernet)
           RX packets 0  bytes 0 (0.0 B)
           RX errors 0  dropped 0  overruns 0  frame 0
           TX packets 0  bytes 0 (0.0 B)
           TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
   enp2s0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
           inet 192.168.0.10  netmask 255.252.0.0  broadcast 192.171.255.255
           inet6 2804:14d:c680:1b71::6  prefixlen 128  scopeid 0x0&lt;global&gt;
           inet6 2804:14d:c680:1b71:1611:48cb:a555:faea  prefixlen 64  scopeid 0x0&lt;global&gt;
           inet6 fe80::86c2:2e62:9e56:6694  prefixlen 64  scopeid 0x20&lt;link&gt;
           ether 00:22:15:bd:5d:42  txqueuelen 1000  (Ethernet)
           RX packets 5356  bytes 519236 (507.0 KiB)
           RX errors 0  dropped 0  overruns 0  frame 0
           TX packets 2461  bytes 313106 (305.7 KiB)
           TX errors 0  dropped 0 overruns 0  carrier 2  collisions 0
           device memory 0xdffc0000-e0000000  
  
   lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;  mtu 65536
           inet 127.0.0.1  netmask 255.0.0.0
           inet6 ::1  prefixlen 128  scopeid 0x10&lt;host&gt;
           loop  txqueuelen 1  (Local Loopback)
           RX packets 0  bytes 0 (0.0 B)
           RX errors 0  dropped 0  overruns 0  frame 0
           TX packets 0  bytes 0 (0.0 B)
           TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
   veth081c0e3: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
           inet6 fe80::34cc:82ff:fec3:7982  prefixlen 64  scopeid 0x20&lt;link&gt;
           ether 36:cc:82:c3:79:82  txqueuelen 0  (Ethernet)
           RX packets 0  bytes 0 (0.0 B)
           RX errors 0  dropped 0  overruns 0  frame 0
           TX packets 36  bytes 3418 (3.3 KiB)
           TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
   veth342b2da: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
           inet6 fe80::1892:d2ff:fe0d:f80b  prefixlen 64  scopeid 0x20&lt;link&gt;
           ether 1a:92:d2:0d:f8:0b  txqueuelen 0  (Ethernet)
           RX packets 0  bytes 0 (0.0 B)
           RX errors 0  dropped 0  overruns 0  frame 0
           TX packets 38  bytes 3638 (3.5 KiB)
           TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
   veth34fb985: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
           inet6 fe80::8029:1ff:fe0e:bdba  prefixlen 64  scopeid 0x20&lt;link&gt;
           ether 82:29:01:0e:bd:ba  txqueuelen 0  (Ethernet)
           RX packets 30  bytes 1440 (1.4 KiB)
           RX errors 0  dropped 0  overruns 0  frame 0
           TX packets 57  bytes 4452 (4.3 KiB)
           TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
   vethe0daeb5: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
           inet6 fe80::5036:49ff:fec6:e6b1  prefixlen 64  scopeid 0x20&lt;link&gt;
           ether 52:36:49:c6:e6:b1  txqueuelen 0  (Ethernet)
           RX packets 0  bytes 0 (0.0 B)
           RX errors 0  dropped 0  overruns 0  frame 0
           TX packets 35  bytes 3348 (3.2 KiB)
           TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  </code></pre>
  
  <p>iptables --list</p>
  
  <pre><code> Chain INPUT (policy ACCEPT) target     prot opt source              
   destination         
  
   Chain FORWARD (policy DROP) target     prot opt source              
   destination          DOCKER-USER  all  --  anywhere            
   anywhere             DOCKER-ISOLATION  all  --  anywhere            
   anywhere             ACCEPT     all  --  anywhere             anywhere
   ctstate RELATED,ESTABLISHED DOCKER     all  --  anywhere            
   anywhere             ACCEPT     all  --  anywhere             anywhere
   ACCEPT     all  --  anywhere             anywhere             ACCEPT  
   all  --  anywhere             anywhere             ctstate
   RELATED,ESTABLISHED DOCKER     all  --  anywhere             anywhere 
   ACCEPT     all  --  anywhere             anywhere             ACCEPT  
   all  --  anywhere             anywhere            
  
   Chain OUTPUT (policy ACCEPT) target     prot opt source              
   destination         
  
   Chain DOCKER (2 references) target     prot opt source              
   destination          
   ACCEPT     tcp  --  anywhere             172.18.0.2           tcp dpt:mysql
   ACCEPT     tcp  --  anywhere             172.18.0.3           tcp dpt:https
   ACCEPT     tcp  --  anywhere             172.18.0.3           tcp dpt:http
  
   Chain DOCKER-ISOLATION (1 references) target     prot opt source      
   destination          DROP       all  --  anywhere             anywhere
   DROP       all  --  anywhere             anywhere             RETURN  
   all  --  anywhere             anywhere            
  
   Chain DOCKER-USER (1 references) target     prot opt source           
   destination          RETURN     all  --  anywhere             anywhere
  </code></pre>
  
  <p><strong>Update4: docker exec</strong></p>
  
  <pre><code> &gt; sudo docker exec e1b469ab4d66 bash -c "tail -f /var/log/httpd/*"
   ==&gt; /var/log/httpd/access.log &lt;==
  
   ==&gt; /var/log/httpd/access_log &lt;==
  
   ==&gt; /var/log/httpd/error.log &lt;== [Mon Oct 02 17:22:32.987017 2017] [ssl:warn] [pid 17] AH01909: RSA certificate configured for
   172.18.0.3:443 does NOT include an ID which matches the server name [Mon Oct 02 17:22:33.073314 2017] [ssl:warn] [pid 17] AH01909: RSA
   certificate configured for 172.18.0.3:443 does NOT include an ID which
   matches the server name
  
   ==&gt; /var/log/httpd/error_log &lt;== [Mon Oct 02 17:22:32.983193 2017] [suexec:notice] [pid 17] AH01232: suEXEC mechanism enabled (wrapper:
   /usr/sbin/suexec) [Mon Oct 02 17:22:33.068405 2017] [core:warn] [pid
   17] AH00117: Ignoring deprecated use of DefaultType in line 99 of
   /etc/httpd/conf/httpd.conf. AH00558: httpd: Could not reliably
   determine the server's fully qualified domain name, using 172.18.0.3.
   Set the 'ServerName' directive globally to suppress this message [Mon
   Oct 02 17:22:33.070143 2017] [auth_digest:notice] [pid 17] AH01757:
   generating secret for digest authentication ... [Mon Oct 02
   17:22:33.071655 2017] [lbmethod_heartbeat:notice] [pid 17] AH02282: No
   slotmem from mod_heartmonitor [Mon Oct 02 17:22:33.072342 2017]
   [ssl:warn] [pid 17] AH01873: Init: Session Cache is not configured
   [hint: SSLSessionCache] [Mon Oct 02 17:22:34.107773 2017]
   [mpm_prefork:notice] [pid 17] AH00163: Apache/2.4.6 (CentOS)
   OpenSSL/1.0.1e-fips PHP/7.0.22 configured -- resuming normal
   operations [Mon Oct 02 17:22:34.109284 2017] [core:notice] [pid 17]
   AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
  </code></pre>