20

The docker repositories contains multiple images. Is it possible to just pull the specific image from Repository.

When I use:

docker pull  ubuntu

It pulls down around 8-10 different versions of ubuntu.

Ananda
  • 1,572
  • 7
  • 27
  • 54

2 Answers2

32

If there's a specific image that's tagged, you could use the --tag= (or -t) operator to pull the specific image you're looking for. There's a shorthand form for the command as well, which uses just a colon between the image name and the tag.

So if you want the version of ubuntu that's tagged as quantal, you could use:

docker pull ubuntu:quantal

The longer forms would be:

docker pull --tag="quantal" ubuntu
docker pull --t quantal ubuntu

This will still pull the historical layers used to build the final image, but will be a smaller subset than all of the layers for ubuntu.

[Updated to include Ben's note on shorthand from below. Thanks!]

johncosta
  • 3,737
  • 1
  • 25
  • 25
2

You can also use

docker pull reponame:tagname
docker pull ubantu:quantal
matang
  • 259
  • 2
  • 9