1. 程式人生 > >docker 學習(十一) 鏡像常用命令

docker 學習(十一) 鏡像常用命令

posit ont 倉庫 login 鏡像 tag dockerhub 下載 repos

1 創建賬戶,創建倉庫

技術分享圖片

  首先在dockerhub上有自己的賬戶,然後創建一個repository(如上圖),

然後創建一個名字為robinfei/consumer的倉庫。

技術分享圖片

2 本地鏡像打標簽(比如本地有個鏡像叫consumer:latest)( 標簽其實就是版本)

  Docker tag consumer:latest robinfei/consumer:1.0

3 登錄docker

  Docker login, 然後輸入用戶名和密碼。

4 上傳鏡像: docker push robinfei/consumer:1.0

5 下載鏡像: docke pull robinfei/consumer:1.0

docker 學習(十一) 鏡像常用命令