- 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.
推薦閱讀
- 少兒人工智能趣味入門:Scratch 3.0動(dòng)畫與游戲編程
- Reporting with Visual Studio and Crystal Reports
- Python數(shù)據(jù)分析基礎(chǔ)
- SQL for Data Analytics
- SQL Server 2016數(shù)據(jù)庫應(yīng)用與開發(fā)習(xí)題解答與上機(jī)指導(dǎo)
- ArcGIS By Example
- Angular開發(fā)入門與實(shí)戰(zhàn)
- Angular應(yīng)用程序開發(fā)指南
- Clojure for Java Developers
- HTML5移動(dòng)前端開發(fā)基礎(chǔ)與實(shí)戰(zhàn)(微課版)
- Kotlin進(jìn)階實(shí)戰(zhàn)
- 實(shí)戰(zhàn)Python網(wǎng)絡(luò)爬蟲
- LabVIEW入門與實(shí)戰(zhàn)開發(fā)100例(第4版)
- 美麗洞察力:從化妝品行業(yè)看顧客需求洞察
- Implementing Domain:Specific Languages with Xtext and Xtend