docker的簡單使用:mac下docker配置http鏡像源,並pull和push鏡像

1.安裝後,配置http的鏡像源,如下圖路徑(registry爲國內加速器,insecure爲自己的:ip+端口)

若上面不行在配網絡代理,最後重啓服務

2.pull鏡像

格式:docker pull 配的鏡像地址/項目名/倉庫名:標籤

docker pull 172.xx.xx.58:80/production/test:latest

pull完了可以查看一下:

docker images 查看本地鏡像

 

3.如何push本地鏡像到倉庫

1)先登錄到倉庫

2)查看鏡像ID 、tag

3)打tag 然後上傳

命令解析

docker tag hello-world:latest 172.xx.xx.58:80/production/hello_test:v1

 

docker命令

tag 打tag

hello-world:latest 本地鏡像名字和Tag版本

172.xx.xx.58:80 harbor倉庫位置

production 倉庫的項目名字

hello_test:v1 爲存儲在倉庫中的名字和標籤

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章