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

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.

主站蜘蛛池模板: 酒泉市| 四子王旗| 彰化市| 页游| 会泽县| 惠东县| 马公市| 榆中县| 钟祥市| 兰考县| 叙永县| 阜新市| 长乐市| 梨树县| 玉溪市| 巴林右旗| 哈密市| 宁强县| 揭西县| 莱芜市| 安乡县| 庆城县| 赫章县| 屏边| 莱西市| 四子王旗| 武强县| 周至县| 甘泉县| 尖扎县| 临洮县| 张北县| 中牟县| 永嘉县| 永仁县| 来安县| 吉首市| 江孜县| 定兴县| 独山县| 湾仔区|