How can we query image version information in Docker?
To check the version information of a Docker image, you can use the following command:
- View information about local image versions.
docker images
This command will display all locally installed images and their versions.
- 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:
- The mirror name refers to the name of the mirror, such as Ubuntu.
- “标签” refers to the version tag of an image, such as “latest.”
- If no tag is specified, the default is to use the latest tag.
I hope the above information is helpful to you!