title: Docker container network issue
body: <p>I am trying to connect my container to a device that is on a private network. I have tried using the host network and exposing a port but when I do that I get the following warning</p>
  <pre><code>WARNING: Published ports are discarded when using host network mode
  </code></pre>
  <p>I then tried using the following code to and tried to ping my device network from the container but still it didn't work.</p>
  <pre><code>docker network create -d macvlan --driver=bridge --subnet=10.112.65.0/16 --ip-range=10.112.65.0/24 --gateway=10.112.65.1 -o parent=eth0 demo_net
  
  docker run --name DemoTest --net=demo_net --ip=10.112.65.103 --entrypoint /bin/bash -it Demo_Test
  </code></pre>
  <p>Does anyone know how I would be able correct this?</p>
  <pre><code>    docker run --name Demo --network=host --entrypoint /bin/bash -it test
  root@docker-desktop:/# ifconfig
  br-0ae4bcee0a03: flags=4099&lt;UP,BROADCAST,MULTICAST&gt;  mtu 1500
          inet 10.112.65.1   netmask 255.255.0.0  broadcast 10.112.255.255
          inet6 fe80::42:7eff:fe95:61a6  prefixlen 64  scopeid 0x20&lt;link&gt;
          ether 02:42:7e:95:61:a6  txqueuelen 0  (Ethernet)
          RX packets 80  bytes 2632 (2.6 KB)
          RX errors 0  dropped 0  overruns 0  frame 0
          TX packets 22  bytes 2040 (2.0 KB)
          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 172.17.255.255
          inet6 fe80::42:3bff:feef:7ff6  prefixlen 64  scopeid 0x20&lt;link&gt;
          ether 02:42:3b:ef:7f:f6  txqueuelen 0  (Ethernet)
          RX packets 1003286  bytes 68950091 (68.9 MB)
          RX errors 0  dropped 0  overruns 0  frame 0
          TX packets 2844246  bytes 4108532649 (4.1 GB)
          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
  eth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
          inet 192.168.65.3  netmask 255.255.255.0  broadcast 192.168.65.255
          inet6 fe80::50:ff:fe00:1  prefixlen 64  scopeid 0x20&lt;link&gt;
          ether 02:50:00:00:00:01  txqueuelen 1000  (Ethernet)
          RX packets 3362882  bytes 4867367901 (4.8 GB)
          RX errors 0  dropped 0  overruns 0  frame 0
          TX packets 1170907  bytes 92178571 (92.1 MB)
          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
  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 1000  (Local Loopback)
          RX packets 3353  bytes 1020141 (1.0 MB)
          RX errors 0  dropped 0  overruns 0  frame 0
          TX packets 3353  bytes 1020141 (1.0 MB)
          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
  services1: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
          inet 192.168.65.4  netmask 255.255.255.255  broadcast 0.0.0.0
          inet6 fe80::78ba:60ff:fe3c:17c  prefixlen 64  scopeid 0x20&lt;link&gt;
          ether 7a:ba:60:3c:01:7c  txqueuelen 0  (Ethernet)
          RX packets 454  bytes 58899 (58.8 KB)
          RX errors 0  dropped 0  overruns 0  frame 0
          TX packets 456  bytes 32795 (32.7 KB)
          TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  
  root@docker-desktop:/# ping 10.112.65.3
  PING 10.112.65.3 (10.112.65.3) 56(84) bytes of data.
  ^C
  --- 10.112.65.3 ping statistics ---
  3 packets transmitted, 0 received, 100% packet loss, time 2063ms
  </code></pre>