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

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.

主站蜘蛛池模板: 游戏| 大姚县| 北海市| 拉孜县| 天柱县| 周口市| 闽侯县| 修文县| 邵阳市| 盐城市| 伊宁市| 桑植县| 隆尧县| 宁德市| 平塘县| 黄大仙区| 沐川县| 伊金霍洛旗| 黄大仙区| 大宁县| 新密市| 林周县| 盐津县| 新竹县| 陈巴尔虎旗| 淅川县| 色达县| 开江县| 锡林郭勒盟| 监利县| 泌阳县| 保康县| 宁化县| 龙南县| 溆浦县| 习水县| 红安县| 波密县| 碌曲县| 宣汉县| 商河县|