title: Docker on Ubuntu has no access to imternet
body: <p>When I try to build my container I get the following errors:</p>
  <pre><code>E: Unable to locate package wget
  E: Unable to locate package unzip
  E: Package 'git' has no installation candidate
  E: Unable to locate package default-jdk
  The command '/bin/sh -c apt-get install wget unzip git default-jdk -y' returned a non-zero code: 100
  </code></pre>
  <p>Here's a list of commands which are supposed to be executed:</p>
  <pre><code>RUN apt-get update
  RUN apt-get install wget unzip git default-jdk -y
  </code></pre>
  <p>From my limited understanding of linux and docker, it's clear that docker has no access to internet.</p>
  <p>Docker version:</p>
  <ul>
  <li>Server Version: 20.10.2</li>
  <li>Docker Inc., v0.9.1-beta3</li>
  <li>Docker Inc., v0.5.1-docker</li>
  </ul>
  <p>Ubuntu: 16.04LTS</p>
  <p>Things I tried:</p>
  <ul>
  <li>added to <code>/etc/default/docker</code> this line <code>DOCKER_OPTS=&quot;--ip-masq=true --dns MY_DNS1 --dns MY_DNS2&quot;</code></li>
  <li>commeted out <code>#dns=dnsmasq</code> from <code>/etc/NetworkManager/NetworkManager.conf</code></li>
  </ul>