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

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.

主站蜘蛛池模板: 仪征市| 襄樊市| 紫金县| 太谷县| 邵武市| 寻乌县| 南平市| 高雄县| 石嘴山市| 德令哈市| 贺州市| 英吉沙县| 大兴区| 都兰县| 调兵山市| 广饶县| 九龙城区| 巫山县| 襄汾县| 株洲市| 扎鲁特旗| 阜新市| 上思县| 棋牌| 常州市| 四子王旗| 新昌县| 毕节市| 莆田市| 宜良县| 朔州市| 齐齐哈尔市| 沂水县| 汝南县| 南京市| 泰兴市| 全州县| 石门县| 沂南县| 饶阳县| 琼中|