When I issue the docker images command there is a "Repository" column -- is this correct?

时间:2016-04-04 16:57:39

标签: docker

I see output that looks like:

REPOSITORY TAG IMAGE ID CREATED SIZE

busybox latest 1234567.. six weeks ago 1.114 MB

How is busybox the name of repository? Isn't it an image?

I am running on Windows.

EDIT: Is it typical or in fact required that a Repository be dedicated to various tags of a single image? Or can a repo have many different images or is that what a Registry is for: many repos in one registry, one image name per repo?

1 个答案:

答案 0 :(得分:1)

That is correct, a repository can contain multiple images, identified by their tag or digest.

For example, here's the images that are locally present on my machine for the ubuntu repository;

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              xenial              537089ecf650        2 weeks ago         119 MB
ubuntu              latest              97434d46f197        2 weeks ago         188 MB
ubuntu              trusty              97434d46f197        2 weeks ago         188 MB

You can see that I have three images in the ubuntu repo in my local cache; ubuntu:xenial, ubuntu:trusty and ubuntu:latest. "trusty" and "latest" in this case are the same image, but tagged with different names (their IMAGE ID is the same).

On the "tags" tab on Docker Hub, you can see the (tagged) images that are currently present in the repository; https://hub.docker.com/r/library/ubuntu/tags/