title: Access host machine in Docker Container on Ubuntu 18.04
body: <p>I am looking for a way to connect to my host machine in a Docker Container (in my case, access to a specific port for using a proxy in the application container).</p>
  
  <p>I tried <code>network_mode: "host"</code> (or <code>docker run --network="host"</code>), it worked in case of accessing to local machine but caused some other problems which were related to changing network driver to <code>host</code>:</p>
  
  <blockquote>
    <p>SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known.</p>
  </blockquote>
  
  <p>Also I can not use <code>ifconfig</code> to define network alias since I'm using Ubuntu 18.04.</p>
  
  <p>What should I do?</p>