change ip address for docker

change ip address for docker

I have a problem with docker: I try to create a container but when I execute

docker run -i -t base /bin/bash   # everything doing good 
aptitude update

I’m getting this error message:

Temporary failure resolving ‘archive.ubuntu.com’

I try to change the IP address of docker0 but all time I fail.

The IP address on my linux

 docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 7a:3c:fa:08:73:94 brd ff:ff:ff:ff:ff:ff
    inet 172.16.42.1

My resolv.conf:

# Generated by NetworkManager
nameserver 213.244.0.15
nameserver 213.244.0.16
nameserver 8.8.8.8

from https://github.com/dotcloud/docker/issues/866#issuecomment-19218300:

You could try to reset all the networking/iptables:

pkill docker
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
docker -d

It will force docker to recreate the bridge and reinit all the network rules.

.
.
.
.