Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker DNS issue when build docker image #15439

Closed
mebest100 opened this issue Aug 10, 2015 · 8 comments
Closed

Docker DNS issue when build docker image #15439

mebest100 opened this issue Aug 10, 2015 · 8 comments

Comments

@mebest100
Copy link

Hi,
I encountered DNS issue when I run make dockerfile to build docker image, details as follow
When run " curl sSL https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz "
It show error : could not resolv the host.
But I already set "DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4" in /etc/default/docker.
And my host machine (ubuntu 14.10) was also set nameserver 8.8.8.8& nameserver 8.8.4.4 in /etc/resolv.conf.
But why there is still DNS issues?
What's the reason? Pls help

BTW: Because China GFW blocked the download resources , I run docker service as below command line:
sudo HTTP_PROXY=127.0.0.1:8118 docker -d & (I use privoxy to serve as a local proxy 127.0.0.1:8118 which transfer shadowsock socket 5 proxy to http proxy to surmount GFW)

@GordonTheTurtle
Copy link

Hi!

Please read this important information about creating issues.

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

This is an automated, informational response.

Thank you.

For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues


BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:

docker version:
docker info:
uname -a:

Provide additional environment details (AWS, VirtualBox, physical, etc.):

List the steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Provide additional info you think is important:

----------END REPORT ---------

#ENEEDMOREINFO

@fneddy
Copy link

fneddy commented Aug 10, 2015

Similar error here. I am trying to pull an Image and a timeout.

version:

>docker version
Client version: 1.7.1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 786b29d
OS/Arch (client): linux/amd64
Server version: 1.7.1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 786b29d
OS/Arch (server): linux/amd64

info:

>docker info
Containers: 3
Images: 0
Storage Driver: btrfs
 Build Version: Btrfs v4.1.2
 Library Version: 101
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 4.1.3-1-ARCH
Operating System: Arch Linux
CPUs: 8
Total Memory: 15.69 GiB
Name: r2d2.****.**** // mycompany
ID: XDJ5:WBW3:67PL:6MZ6:A4PB:L3DE:AYC5:HIA5:XYX2:7QAD:WPDR:OMJR

uname:

>uname -a
Linux r2d2.****.**** 4.1.3-1-ARCH #1 SMP PREEMPT Wed Jul 22 20:37:12 CEST 2015 x86_64 GNU/Linux

/etc/resolve.conf

nameserver 8.8.8.8
nameserver 8.8.4.4

/etc/default/docker

DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"

Reproduce by:

>docker pull ubuntu
Pulling repository ubuntu
Get https://registry-1.docker.io/v1/repositories/library/ubuntu/tags: read tcp 54.152.161.54:443: i/o timeout

ping

>ping registry-1.docker.io
PING us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com (54.208.130.47) 56(84) bytes of data.
^C
--- us-east-1-elbio-rm5bon1qaeo4-623296237.us-east-1.elb.amazonaws.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

@sprankle
Copy link

Update to 1.8 and try again. I believe it is solved here: #13381

@aboch
Copy link
Contributor

aboch commented Aug 14, 2015

@Yuan78 @berlineddy Just to make sure, if your host is using systemd, content of /etc/default/docker does not get read by default when docker service is being launched. Follow instructions at Control and configure Docker with systemd

@mebest100
Copy link
Author

@theSprankle : Hi, how to update to 1.8? I try "curl -sSL https://get.docker.com/ | sh", but the result shows only 1.7 available.

@aboch , Hi, my OS is ubuntu 14.10, hence cannot use systemd,I try to config /etc/default/docker, but it still does not work.

@thaJeztah
Copy link
Member

@Yuan78 correct, Ubuntu 14.10 is EOL'd by Ubuntu (http://fridge.ubuntu.com/2015/07/03/ubuntu-14-10-utopic-unicorn-reaches-end-of-life-on-july-23-2015/) and we no longer publish Docker for 14.10. You should either upgrade to Ubuntu 15.04 (which is still supported), or use a LTS release (currently Ubuntu 14.04)

@thomaszbz
Copy link

@Yuan78 Before Update, make sure you uninstall docker.io/similar packages

Install 1.8.1 on ubuntu 14.04.3, Kernel 3.19 (via Hardware Enablement Stack http://www.slicewise.net/debian/hardware-enablement-stack-fuer-ubuntu-1404-lts-trusty-tahr/):

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker-testing-trusty.list
apt-get update
apt-get upgrade
apt-get install docker-engine

@LK4D4
Copy link
Contributor

LK4D4 commented Sep 13, 2016

This is quite old, and there were no complaints for a year. Going to close it. Feel free to reopen if problem persists.

@LK4D4 LK4D4 closed this as completed Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants