Docker Ubuntu 16 on a Ubuntu 14 machine : no Internet connection
NickName:Baptiste Arnaud Ask DateTime:2017-04-11T21:15:25

Docker Ubuntu 16 on a Ubuntu 14 machine : no Internet connection

I run a Ubuntu docker on my machine but when i type the apt-get update command, it says :

root@50e964833537:/# apt-get update
Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu xenial-security InRelease
  Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done        
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-security/InRelease  Temporary failure resolving 'archive.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

I tried several "solutions" I found but still it doesn't work. I don't have access to any command in the docker because I can't update. I suppose because my Docker doesn't have access to Internet. How can I fix this ?

Copyright Notice:Content Author:「Baptiste Arnaud」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/43347052/docker-ubuntu-16-on-a-ubuntu-14-machine-no-internet-connection

Answers
Baptiste Arnaud 2017-04-11T14:01:25

SOLUTION :\n\nI'm in a corporate network so I had to change the DNS ip adresses by follow these steps :\n\nOn the Host Machine :\n\n\nnm-tool | grep DNS It will output the DNS servers\nsudo nano /etc/default/docker and change the following line with DNS you got in the first step:\n\n\nDOCKER_OPTS=\"--dns 'your_dns_server_1' --dns 'your_dns_server_2'\"\n\nRestart docker : sudo service docker restart\n",


More about “Docker Ubuntu 16 on a Ubuntu 14 machine : no Internet connection” related questions

Docker Ubuntu 16 on a Ubuntu 14 machine : no Internet connection

I run a Ubuntu docker on my machine but when i type the apt-get update command, it says : root@50e964833537:/# apt-get update Err:1 http://archive.ubuntu.com/ubuntu xenial InRelease Temporary fa...

Show Detail

Whether Docker machine necessary for Ubuntu,if not how to TCP a Ubuntu docker daemon?

I have installed docker on ubuntu machine to run docker on tcp in windows or mac machine we need docker-machine whereas in ubuntu it not necessary since it is already running on linux environment If

Show Detail

Installing docker on Ubuntu 16.04 disconnects the internet and intranet

I installed docker on my laptop having ubuntu 16.04, it started a new network bridge connection called docker0 and all my net connection including internet and intranet stopped working. Tried many ...

Show Detail

What are the differences between ubuntu and and an ubuntu docker image?

With docker it seems like it's possible to run multiple OS's on the same machine for example docker run -it ubuntu:latest root@09e498dae658:/# docker run -it centos:latest [root@8216b5141efc /]# ...

Show Detail

Is there a way to Install Kubernetes offline (without internet connection) on Ubuntu 16.04 machine

I am trying to install Install Kubernetes offline (without an internet connection) on Ubuntu 16.04 machine. Is there any procedure or steps to follow for the installation without internet connecti...

Show Detail

No internet connection inside Docker containers

I cannot execute any command requiring internet connection inside any Docker container. Works: docker run ubuntu /bin/echo 'Hello world' Does not work: docker run ubuntu apt-get update Err:1 h...

Show Detail

How to pull a git repository on ubuntu without internet connection?

I want to use Git over the local network in our company because I don't have internet access in my computer. My friend has an internet connection and an ubuntu machine, he pushed some source codes ...

Show Detail

Can i install docker on ubuntu trusty

I want to install docker on my machine which runs ubuntu-14.04 Trusty. But in the official documentation it dosent say anything about ubuntu 14 Only about ubuntu 19, 18, 16

Show Detail

Different output in terminal in Ubuntu 14 and Ubuntu 16

I hope you can help me with my problem: CONTEXT I'm working on a Java application. Following java, instruction works properly in in Ubuntu 16, but It fails when deploying on an Ubuntu 14. String...

Show Detail

How to install Docker in Ubuntu offline

I need to install Docker in an Ubuntu 18 machine which do not have any internet access. There are plethora of instruction material exist on this this subject but all they require Ubuntu machine to be

Show Detail