- Hands-On Kubernetes on Windows
- Piotr Tylenda
- 147字
- 2021-06-24 16:54:06
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.
推薦閱讀
- 深度實(shí)踐OpenStack:基于Python的OpenStack組件開發(fā)
- 大學(xué)計(jì)算機(jī)基礎(chǔ)實(shí)驗(yàn)教程
- PyTorch Artificial Intelligence Fundamentals
- 從0到1:HTML+CSS快速上手
- Easy Web Development with WaveMaker
- Mastering Predictive Analytics with Python
- Learning Hunk
- Java編程的邏輯
- 區(qū)塊鏈底層設(shè)計(jì)Java實(shí)戰(zhàn)
- Instant Lucene.NET
- Kivy Cookbook
- Photoshop智能手機(jī)APP界面設(shè)計(jì)
- Three.js權(quán)威指南:在網(wǎng)頁上創(chuàng)建3D圖形和動(dòng)畫的方法與實(shí)踐(原書第4版)
- Building a Media Center with Raspberry Pi
- 程序員面試金典(第6版)