There is no option to provide the net as param while building the docker images.
So the container doesn’t have internet from inside.
and is common to get this kind of errors

Running in NNNNNNNNN
Err http://http.debian.net wheezy Release.gpg
  Could not resolve 'http.debian.net'

One (stupid) solution is to put in the Docker file

RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf; cat /etc/resolv.conf

Another is to help Docker with the networking.

Here is a solution is pointed here

# Forward chain between docker0 and eth0
iptables -A FORWARD -i docker0 -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o docker0 -j ACCEPT
# IPv6 chain if needed
ip6tables -A FORWARD -i docker0 -o eth0 -j ACCEPT
ip6tables -A FORWARD -i eth0 -o docker0 -j ACCEPT

And also to configure docker to use a dns server as pointed here

Docker official doc gives instruments to Configure a DNS server for use by Docker

Open the /etc/default/docker file for editing.

$ sudo nano /etc/default/docker

Add a setting for Docker.

DOCKER_OPTS="--dns 8.8.8.8"

Replace 8.8.8.8 with a local DNS server such as 192.168.1.1. You can also specify multiple DNS servers. Separated them with spaces, for example:

–dns 8.8.8.8 –dns 192.168.1.1

Warning: If you’re doing this on a laptop which connects to various networks, make sure to choose a public DNS server.

ps: nm-tool can be used to check local host DNS server

Save and close the file.

Restart the Docker daemon.

$ sudo restart docker