docker使用阿里雲鏡像倉庫

1:阿里雲docker倉庫 https://dev.aliyun.com/search.html

2:進去註冊帳號後,點擊自己的管理中心。

3:在管理中心點擊加速器,右邊面板會有你的加速地址,右邊面板下面有詳細設置步驟。
以下代碼用於檢測你有沒有開啓加速器
sudo ps -ef | grep
root 17825 1 0 16:50 ? 00:00:11 /usr/bin/dockerd --registry-mirror=https://no1pfk8z.mirror.aliyuncs.com --registry-mirror=https://no1pfk8z.mirror.aliyuncs.com --registry-mirror=https://n42ocvxt.mirror.aliyuncs.com --raw-logs
1
2
有如上的信息輸出代表你已經成功了

4:使用commit構建鏡像,執行命令
docker pull centos:latest
sudo docker run -it -p 80 --name willian centos /bin/bash
1
2
在bash安裝所需要的運行的環境
sudo docker commit -a 'ss' willian willian/java8
1
將鏡像提交到本地倉庫

sudo docker images
1
這時可以看到你自己的鏡像

$ sudo docker login --username=willian19960118 registry.cn-hangzhou.aliyuncs.com
1
2
給阿里雲倉庫打tag

$ sudo docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/willianevils/zhangweilun:[鏡像版本號]
1
2
push

$ sudo docker push registry.cn-hangzhou.aliyuncs.com/willianevils/zhangweilun:[

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