title: docker build failing with Could not resolve 'archive.ubuntu.com'
body: <p>I cannot build my image with the following Dockerfile:</p>
  
  <pre><code>FROM ubuntu
  
  RUN apt-get -y update &amp;&amp; apt-get -y install \
  nodejs npm ssh
  
  # cache npm install when package.json hasn't changed
  WORKDIR /tmp
  ADD package.json package.json
  RUN npm install
  RUN npm install -g pm2
  
  RUN mkdir /sparrow
  RUN cp -a /tmp/node_modules /sparrow
  
  WORKDIR /sparrow
  ADD . /sparrow/
  RUN npm run build
  
  # ssh keys
  WORKDIR /root
  RUN mv /sparrow/.ssh /root/
  
  # upload js and css
  WORKDIR /sparrow/build
  # UPLOAD TO S3!
  
  # go back to /sparrow
  WORKDIR /sparrow
  
  ENV NODE_ENV production
  ENV NODE_PATH "./src"
  
  EXPOSE 8000
  CMD ["pm2", "start", "./bin/server.js", "--no-daemon", "-i", "0"]
  </code></pre>
  
  <p>Seems like it's having trouble connecting to the internet to install ubuntu packages and failing with:</p>
  
  <pre><code>Err http://archive.ubuntu.com trusty InRelease
  
  Err http://archive.ubuntu.com trusty-updates InRelease
  
  Err http://archive.ubuntu.com trusty-security InRelease
  
  Err http://archive.ubuntu.com trusty Release.gpg
    Could not resolve 'archive.ubuntu.com'
  Err http://archive.ubuntu.com trusty-updates Release.gpg
    Could not resolve 'archive.ubuntu.com'
  Err http://archive.ubuntu.com trusty-security Release.gpg
    Could not resolve 'archive.ubuntu.com'
  Reading package lists...
  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
  
  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
  
  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/InRelease
  
  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not resolve 'archive.ubuntu.com'
  
  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Could not resolve 'archive.ubuntu.com'
  
  W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Could not resolve 'archive.ubuntu.com'
  
  W: Some index files failed to download. They have been ignored, or old ones used instead.
  Reading package lists...
  Building dependency tree...
  Reading state information...
  E: Unable to locate package nodejs
  E: Unable to locate package npm
  </code></pre>
  
  <p>Any suggestions for how to resolve or test this problem? Running on El Capitan OSX</p>
  
  <p>Thanks!</p>