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

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.

主站蜘蛛池模板: 宁晋县| 若羌县| 梁河县| 剑阁县| 东方市| 读书| 伊通| 潮州市| 大关县| 开原市| 桐庐县| 淮北市| 同仁县| 五华县| 龙江县| 霍邱县| 沾益县| 龙南县| 海口市| 中西区| 延寿县| 台南市| 准格尔旗| 舞阳县| 手游| 仁怀市| 达州市| 陵川县| 洮南市| 吉安县| 孟村| 马边| 河北省| 武宣县| 和政县| 夏津县| 满城县| 桂阳县| 榆林市| 鄂温| 抚宁县|