FreeKB - docker pull command (download an image)
Docker - docker pull command (download an image)

This assumes you have installed Docker on Linux and Docker is running. Before pulling down an image, you'll want to use the docker images command to return the list of images that have allready been pulled down, like this.

docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
foo                 latest              105b54dc64f1        32 hours ago        196.7 MB

 

Then, use the docker search command to find the image you want to pull down.

The docker pull command followed by the name of the image pulls down the image. In this example, the "bar" image will be pulled down.

docker pull bar

 

By default, the latest version of the image will be pulled down. Or, you can explicity include latest.

docker pull bar:latest

 

Something like this should be displayed.

Unable to find image 'bar:latest' locally
Trying to pull repository docker.io/library/bar ...
latest: Pulling from docker.io/library/bar
xxxxxxxxxxxxxx: Pull complete
xxxxxxxxxxxxxx: Pull complete
xxxxxxxxxxxxxx: Pull complete
Digest: sha256:xxxxxxxxxxxxxxxxxxxxxxx
...

 

Reissuing the docker images command should now show that the latest bar image has been pulled down.

docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
foo                 latest              105b54dc64f1        32 hours ago        196.7 MB
bar                 latest              95ga44bc5582        2 weeks ago         967 B

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter b9b3a in the box below so that we can be sure you are a human.




Comments