官术网_书友最值得收藏!

Image tagging and versioning

Docker images use tags in order to provide different versions of the same image in the repository each image tag corresponds to a given Docker image ID. Specifying tags for Docker images is often performed during an image build, but you can also add tags explicitly using the docker tag command:

docker pull mcr.microsoft.com/dotnet/core/sdk
docker tag mcr.microsoft.com/dotnet/core/sdk:latest mydotnetsdk:v1
docker tag mcr.microsoft.com/dotnet/core/sdk:latest mydotnetsdk:v2

In this example, we pulled the latest image tag (as it was not specified explicitly) of the .NET Core SDK and then tagged the image with the mydotnetsdk:v1 and mydotnetsdk:v2 tags in the local image cache. Now, it is possible to use these tags while performing operations on your local machine, like so:

docker run -it --rm mydotnetsdk:v1

Let's take a look at the latest tag, which is often used when working with Docker.

主站蜘蛛池模板: 台南市| 四平市| 汉寿县| 莱阳市| 贵溪市| 永安市| 界首市| 济阳县| 阿拉善盟| 牙克石市| 二连浩特市| 肇州县| 新巴尔虎左旗| 敖汉旗| 满城县| 商洛市| 铁力市| 麻栗坡县| 墨玉县| 舟曲县| 望城县| 临漳县| 郸城县| 兴安盟| 西畴县| 哈尔滨市| 蒲江县| 石柱| 凤山县| 武邑县| 中方县| 永嘉县| 广丰县| 会同县| 龙陵县| 济南市| 烟台市| 兴文县| 门源| 遂昌县| 丽水市|