why did the pulling process in docker act like this?
pete@pete-Aspire-4750:~$ sudo docker run ubuntu:14.04 /bin/echo "hello world" Unable to find image 'ubuntu:14.04' locally ubuntu:14.04: The image you are pulling has been verified 53f858aaaf03: Downloading 57.31 MB/197.2 MB 1h57m42s 837339b91538: Download complete 615c102e2290: Download complete b39b81afc8ca: Download complete 511136ea3c5a: Already exists
then nothing happened! is it beacause I’m in China ,so I can’t get the image behind the greatwall?
or something else?
2 Solutions collect form web for “why did the pulling process in docker act like this?”
The output says that the download is complete. You can do a check by issuing the command
sudo docker images. It will list the downloaded images like given below.
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ubuntu 13.10 5e019ab7bf6d 4 weeks ago 180 MB
I’m speculating that it did work. The “hello world” should have appeared at the end. Did you try running the command a second time? Now that the image has been downloaded you should see the result immediately.
Don’t forget every time you run the command you’re creating a container instance. These will accumulate locally:
$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 9a31ad292a0a ubuntu:14.04 "/bin/echo 'hello wo About a minute ago Exited (0) About a minute ago ecstatic_darwin 035cf18ee6a2 ubuntu:14.04 "/bin/echo 'hello wo 3 minutes ago Exited (0) 3 minutes ago sick_hawking
A better way to issue the run command is to include the “–rm” option which will automatically delete the container instance when your finishing with them
$ docker run --rm -it ubuntu:14.04 /bin/echo "hello world" hello world
Hope this helps.
Downloading images behind firewalls is not uncommon, but your error message would explicitly show failures (Your output shows “Download complete” messages). This is normally fixed by setting the http proxy environment variable. See:
- Cannot download Docker images behind a proxy