I am brand new to Docker and following the Getting Started tutorial. At step 7 it says
type
docker images
command and press RETURN. The comma
Images are built by running docker build
with a given Dockerfile
and are identified by their ID.
Repositories and Tags are just means to name and organize your images in a meaningful hierarchies/architectures.
A repository typically contains multiple related images
An image can go into multiple repositories
The following, from this SO answer, gives detailed explanation of docker images
output (This is probably what they should have put in the docs):
IMAGE ID is the first 12 characters of the true identifier for an image. You can create many tags of a given image, but their IDs will all be the same (as above).
The value in the REPOSITORY column comes from the
-t
flag of thedocker build
command, or fromdocker tag
-ing an existing image. You're free to tag images using a nomenclature that makes sense to you, but know that docker will use the tag as the registry location in adocker push
ordocker pull
.- The full form of a tag is
[REGISTRYHOST/][USERNAME/]NAME[:TAG]
. Forubuntu
above, REGISTRYHOST is inferred to beregistry.hub.docker.com
. So if you plan on storing your image calledmy-application
in a registry atdocker.example.com
, you should tag that imagedocker.example.com/my-application
.- The TAG column is just the [:TAG] part of the full tag. This is unfortunate terminology.