Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot download Docker image from repository

I am trying to create a swarm setup on my laptop. I am running swarm daemon on laptop, and running 2 Ubuntu 14.04 VM as docker node. On one of the nodes I am able to run swarm and I can connect to swarm daemon. I can list the node with docker info and spawn a container on it. But when I try to pull swarm image on another VM node, I get the following error:

pensu@pensu-virtual-machine:~$ sudo docker pull swarm
Pulling repository swarm
FATA[0025] Get https://index.docker.io/v1/repositories/library/swarm/images: dial tcp: lookup index.docker.io on 127.0.1.1:53: read udp 127.0.1.1:53: i/o timeout 

I checked and someone said it's a proxy issue. But I am not using any proxy server. Here are other relevant information:

pensu@pensu-virtual-machine:~$ sudo docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

Here is my /etc/default/docker:

pensu@pensu-virtual-machine:~$ cat /etc/default/docker 
# Docker Upstart and SysVinit configuration file

# Customize location of Docker binary (especially for development testing).
#DOCKER="/usr/local/bin/docker"

# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"

# If you need Docker to use an HTTP proxy, it can also be specified here.
#export http_proxy="http://127.0.0.1:3128/"

# This is also a handy place to tweak where Docker's temporary files go.
#export TMPDIR="/mnt/bigdrive/docker-tmp"

Any idea about what am I doing wrong?

Update: This is something different. I was trying this all from home. Today morning I came to office, logged in and voila, I was able to pull the image!

Not sure what is the reason, but looks like I will need to come to office to pull docker images!

like image 829
Pensu Avatar asked Mar 05 '15 17:03

Pensu


People also ask

How do I download a docker image from GitHub?

You can use the docker pull command to install a docker image from GitHub Packages, replacing OWNER with the name of the user or organization account that owns the repository, REPOSITORY with the name of the repository containing your project, IMAGE_NAME with name of the package or image, HOSTNAME with the host name of ...

How do I download an image from docker?

To download the Docker image, complete the following steps: Log on to the Fix Central web site by using necessary credentials. Load the Docker image into registry using the downloaded image file by running the following command. Invoke the docker images command to verify if the image is loaded successfully.

How do I pull an image from a private docker repository?

In order to pull images from your private repository, you'll need to login to Docker. If no registry URI is specified, Docker will assume you intend to use or log out from Docker Hub. Triton comes with several images built-in. You can view the available list with triton images .

Can I download docker images manually?

A better workaround is to download the images manually and load them to the docker-machine. This is a much better solution as the manual download has much lower chances to fail than restarting the docker-machine hoping that docker pull starts working.


2 Answers

Just stop and restart your docker host:

boot2docker stop
boot2docker start

Credits to: https://forums.docker.com/t/pulling-docker-images-i-o-timeout/740/6

like image 108
jlucasps Avatar answered Oct 05 '22 15:10

jlucasps


Updated for modern times:

docker-machine stop default
docker-machine start default

(docker-machine restart default doesn't fix it).

like image 35
Synesso Avatar answered Oct 05 '22 14:10

Synesso