Docker Fetching an image from Docker Hub


Example

Ordinarily, images are pulled automatically from Docker Hub. Docker will attempt to pull any image from Docker Hub that doesn't already exist on the Docker host. For example, using docker run ubuntu when the ubuntu image is not already on the Docker host will cause Docker to initiate a pull of the latest ubuntu image. It is possible to pull an image separately by using docker pull to manually fetch or update an image from Docker Hub.

docker pull ubuntu
docker pull ubuntu:14.04

Additional options for pulling from a different image registry or pulling a specific version of an image exist. Indicating an alternate registry is done using the full image name and optional version. For example, the following command will attempt to pull the ubuntu:14.04 image from the registry.example.com registry:

docker pull registry.example.com/username/ubuntu:14.04