简体   繁体   中英

Unable to push image to Docker Hub registry

I am brand new to Docker and I am trying to follow the Getting Started tutorial from Docker. I am using Docker 17.05-ce under Ubuntu 17.04. The problem appears to be network related. When I try to push I get the following results:

jonathan@poseidon:~/DockerTest$ sudo docker push jgossage/get-started:part1
The push refers to a repository [docker.io/jgossage/get-started]
1770f1c9a8cf: Pushed 
61fd1d8cd138: Pushed 
e0f735a5e86f: Layer already exists 
1de570a07fb5: Pushed 
b3640b6d4ac2: Layer already exists 
08d4c9ccebfd: Pushed 
007ab444b234: Retrying in 1 second 
dial tcp: lookup registry-1.docker.io on 127.0.0.53:53: dial udp 127.0.0.53:53: i/o timeout
jonathan@poseidon:~/DockerTest$ sudo docker logs 58e8df0a7426
 * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
172.17.0.1 - - [20/Jun/2017 15:12:24] "GET / HTTP/1.1" 200 -

172.17.0.1 - - [20/Jun/2017 15:13:17] "GET / HTTP/1.1" 200 -

The push runs for some time with several retries before timing out.

This is on a home network with one computer connected to the router via WiFi and then normal TCP to my ISP and the Internet. What steps can I take to make Docker run reliably?

It looks like a DNS issue similar to this one: https://forums.docker.com/t/fata-0025-io-timeout-on-docker-image-push/1742/9

The suggestion is to replace your current DNS (127.0.0.53) by the Google DNS (8.8.8.8).

I'm not sure if there is an open issue concerning this problem. I couldn't find one.

I resolved this issue by replacing the standard DNS caching and resolving DNS server with a third party implementation unbound . The following web page contains complete instructions for doing this at the end of the document. As also suggested by others, it is a good idea to change to use the public Google DNS servers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM