Windows XP Windows 7 Windows 2003 Windows Vista Windows教程綜合 Linux 系統教程
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟件教程
 Windows教程網 >> Linux系統教程 >> Linux教程 >> docker私有倉庫建立與鏡像推送

docker私有倉庫建立與鏡像推送

日期:2017/2/7 14:24:03      編輯:Linux教程
 

簡單記錄:

1.拉原始鏡像

docker pull regsitry

docker pull centos

2.啟動registry倉庫

docker run -t -i -d -p 5000:5000 -v /root/my_registry:/tmp/registry registry [你懂的]

3.給進行打標簽

docker tag 9dbcac75201e docker10.sklinux.com:5000/centos:7 [tag為倉庫地址+端口+名稱+版本]

4.推送鏡像至私有倉庫

docker push docker10.sklinux.com:5000/centos:7[你懂的]

 

root@docker10:~/my_registry# docker tag 9dbcac75201e docker10.sklinux.com:5000/centos:7
root@docker10:~/my_registry# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos 7 9dbcac75201e 3 days ago 215.6 MB
centos centos7 9dbcac75201e 3 days ago 215.6 MB
centos latest 9dbcac75201e 3 days ago 215.6 MB
docker10.sklinux.com centos7 9dbcac75201e 3 days ago 215.6 MB
docker10.sklinux.com:5000/centos 7 9dbcac75201e 3 days ago 215.6 MB
centos 7.1.1503 b58de3b24eb7 9 days ago 212.1 MB
centos centos7.1.1503 b58de3b24eb7 9 days ago 212.1 MB
registry latest 59b1f7d49dc8 9 days ago 413.6 MB
centos 5.11 2e4a66ce2189 5 weeks ago 284.2 MB
centos centos5.11 2e4a66ce2189 5 weeks ago 284.2 MB
centos 6.6 0bc55ae673f7 5 weeks ago 202.6 MB
centos centos6.6 0bc55ae673f7 5 weeks ago 202.6 MB
centos 7.0.1406 99d42dc65aa6 5 weeks ago 210.2 MB
centos centos7.0.1406 99d42dc65aa6 5 weeks ago 210.2 MB
centos 5 861c710fef70 5 weeks ago 284.1 MB
centos centos5 861c710fef70 5 weeks ago 284.1 MB
centos 6 f6808a3e4d9e 5 weeks ago 202.6 MB
centos centos6 f6808a3e4d9e 5 weeks ago 202.6 MB
root@docker10:~/my_registry# docker push docker10.sklinux.com:5000/centos:7
The push refers to a repository [docker10.sklinux.com:5000/centos] (len: 1)
Sending image list
Pushing repository docker10.sklinux.com:5000/centos (1 tags)
511136ea3c5a: Image successfully pushed
b6718650e87e: Image successfully pushed
493bab5fff45: Image successfully pushed
9dbcac75201e: Image successfully pushed
Pushing tag for rev [9dbcac75201e] on {http://docker10.sklinux.com:5000/v1/repositories/centos/tags/7}
root@docker10:~/my_registry# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos 7 9dbcac75201e 3 days ago 215.6 MB
centos centos7 9dbcac75201e 3 days ago 215.6 MB
centos latest 9dbcac75201e 3 days ago 215.6 MB
docker10.sklinux.com centos7 9dbcac75201e 3 days ago 215.6 MB
docker10.sklinux.com:5000/centos 7 9dbcac75201e 3 days ago 215.6 MB
centos 7.1.1503 b58de3b24eb7 9 days ago 212.1 MB
centos centos7.1.1503 b58de3b24eb7 9 days ago 212.1 MB
registry latest 59b1f7d49dc8 9 days ago 413.6 MB
centos 5.11 2e4a66ce2189 5 weeks ago 284.2 MB
centos centos5.11 2e4a66ce2189 5 weeks ago 284.2 MB
centos 6.6 0bc55ae673f7 5 weeks ago 202.6 MB
centos centos6.6 0bc55ae673f7 5 weeks ago 202.6 MB
centos 7.0.1406 99d42dc65aa6 5 weeks ago 210.2 MB
centos centos7.0.1406 99d42dc65aa6 5 weeks ago 210.2 MB
centos 5 861c710fef70 5 weeks ago 284.1 MB
centos centos5 861c710fef70 5 weeks ago 284.1 MB
centos 6 f6808a3e4d9e 5 weeks ago 202.6 MB
centos centos6 f6808a3e4d9e 5 weeks ago 202.6 MB

Copyright © Windows教程網 All Rights Reserved