Docker: Pull Command – Examples

The docker pull command serves for downloading Docker images from a registry.

By default, the docker pull command pulls images from Docker Hub, but it is also possible to manually specify the private registry to pull from.

Before running the docker pull command it needs to search the Docker registry for the image to download.

In the examples below i will show how to pull the CentOS image from the official repository.

Cool Tip: Image vs. Container … What is the difference? Read More →

Docker Pull Command

The syntax of the docker pull command:

$ docker pull [OPTIONS] [PATH/]IMAGE_NAME[:TAG]

Docker Pull Latest

Pull the latest version of an image:

$ docker pull centos

– or –

$ docker pull centos:latest

Docker Pull Specific Version

Pull a specific version of an image:

$ docker pull centos:centos7.4.1708

– or –

$ docker pull centos:7.4.1708

Docker Pull All Images

Pull all tagged images:

$ docker pull -a centos

Docker Pull From Private Registry

The syntax of the docker pull command for pulling an image from a private registry:


Examples of pulling Docker images from a private repository:

$ docker pull
$ docker pull
$ docker pull -a

If a registry is password protected, you should log in to it before pulling:

$ docker login

3 Replies to “Docker: Pull Command – Examples”

  1. Is there a difference between a Docker registry and repository? You seem to use the words interchangeably here.

    1. Hello. There is no differences from my point of view.

  2. A docker REGISTRY is a web-server-like thing that publishes images and offers them for download. For example,
    A docker REPOSITORY is a collection of images with the same name and different tags. For example “myhost:1000/myimage:v1” and “myhost:1000/myimage:v2” are both in the repository “myhost:1000/myimage”.
    I find this usage confusing, but I think I have accurately described what the Docker project does.

Leave a Reply