How can we query image version information in Docker?

To check the version information of a Docker image, you can use the following command:

  1. View information about local image versions.
docker images

This command will display all locally installed images and their versions.

  1. Check the version information of a specific image.
docker inspect <镜像名称>:<标签>

For example, to view version information of an image named ubuntu:

docker inspect ubuntu:latest

This command will display detailed information about the image, including the version number.

Please pay attention:

  1. The mirror name refers to the name of the mirror, such as Ubuntu.
  2. “标签” refers to the version tag of an image, such as “latest.”
  3. If no tag is specified, the default is to use the latest tag.

I hope the above information is helpful to you!

广告
Closing in 10 seconds
bannerAds