May 22, 2021 Docker From entry to practice
Use
docker images
that are already local.
$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
ubuntu 12.04 74fe38d11401 4 weeks ago 209.6 MB
ubuntu precise 74fe38d11401 4 weeks ago 209.6 MB
ubuntu 14.04 99ec81b80c55 4 weeks ago 266 MB
ubuntu latest 99ec81b80c55 4 weeks ago 266 MB
ubuntu trusty 99ec81b80c55 4 weeks ago 266 MB
...
In the listed information, you can see several field information
ID
number (unique)
Where the
ID
uniquely identifies the mirror,
ubuntu:14.04
and
ubuntu:trusty
the same mirror
ID
indicating that they are actually the same mirror.
TAG
information is used to mark different images from the same warehouse. F
or
ubuntu
TAG
release versions by TAG information, such as
10.04
12.04
12.10
13.04
14.04
on.
For example, the following command specifies
ubuntu:14.04
to start a container.
$ sudo docker run -t -i ubuntu:14.04 /bin/bash
If you do not specify a specific tag, the
latest
by default.