Docker pull: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
=Overview=
=Overview=


Pull an [[Docker Concepts#Image|image]] or a [[Docker Concepts#Image_Repository|repository]] from a [[Docker_Concepts#Image_Registry|registry]] and place it into the [[Docker_Concepts#Local_Image_Registry|local registry]]. By default, unless an explicit registry name is specified, the command pulls from [[Docker_Concepts#Docker_Hub|Docker Hub]]. assuming "docker.io" as registry name. For more details on the URL semantics see [[Docker Concepts#URL|Docker Concepts - URL]].
Pull an [[Docker Concepts#Image|image]] or a [[Docker Concepts#Image_Repository|repository]] from a [[Docker_Concepts#Image_Registry|registry]] and place it into the [[Docker_Concepts#Local_Image_Registry|local registry]]. By default, unless an explicit registry name is specified, the command pulls from [[Docker_Concepts#Docker_Hub|Docker Hub]]. assuming "docker.io" as registry name.  
 
  docker pull <''name''>[:<''tag''>]
  docker pull <''name''>[:<''tag''>]


Line 16: Line 15:


<span id='Image/Repository_Name'></span>
<span id='Image/Repository_Name'></span>
The command accepts an [[Docker_Concepts#Image_Name|image name]] or a [[Docker_Concepts#Repository_Name|repository name]].
The command accepts an [[Docker_Concepts#Image_Name|image name]] or a [[Docker_Concepts#Repository_Name|repository name]]. For more details on the URL semantics see [[Docker Concepts#URL|Docker Concepts - URL]].
 
When no explicit tag is specified, "latest" is implied. The following commands are equivalent:
 
docker pull novaordis/databot
 
docker pull novaordis/databot:latest
 
However, the "latest" tag must exist in the repository on the registry being accessed, for the command to work. More details about the "latest" tag here:
 
{{Internal|Docker_Concepts#The_.22latest.22_Tag|The "latest" tag}}


==Example==
==Example==

Latest revision as of 00:30, 24 January 2018

External

Internal

Overview

Pull an image or a repository from a registry and place it into the local registry. By default, unless an explicit registry name is specified, the command pulls from Docker Hub. assuming "docker.io" as registry name.

docker pull <name>[:<tag>]

The command pulls each layer separately, and it will only pull the layers that do not exist in the local repository.

The command accepts an image name or a repository name. For more details on the URL semantics see Docker Concepts - URL.

When no explicit tag is specified, "latest" is implied. The following commands are equivalent:

docker pull novaordis/databot
docker pull novaordis/databot:latest

However, the "latest" tag must exist in the repository on the registry being accessed, for the command to work. More details about the "latest" tag here:

The "latest" tag

Example

docker pull registry.access.redhat.com/openshift3/jenkins-2-rhel7
Using default tag: latest
Trying to pull repository registry.access.redhat.com/openshift3/jenkins-2-rhel7 ...
sha256:c2e5ffc909fc598628caebe56571849cbcbeea6c99f885a9870cb8c5967d5111: Pulling from registry.access.redhat.com/openshift3/jenkins-2-rhel7
26e5ed6899db: Already exists
66dbe984a319: Already exists
634b7b97a070: Already exists
Digest: sha256:c2e5ffc909fc598628caebe56571849cbcbeea6c99f885a9870cb8c5967d5111
Status: Image is up to date for registry.access.redhat.com/openshift3/jenkins-2-rhel7:latest

Pull from a Different Registry

By default, docker pull pulls images from Docker Hub, but an image can be pulled form a different registry by specifying the registry path as prefix of the image name.

docker pull registry.access.redhat.com/rhscl/postgresql-95-rhel7