構建docker私有庫
阿新 • • 發佈:2018-12-02
前提:
ip:172.16.0.9
1下載registry
docker pull registry
2 建庫
將庫像放到l永久地址
mkdir /opt/data/registry
docker run -d -p 5000:5000 -v /opt/data/registry:/tmp/registry registry
3 客戶端新增配置
cat /etc/docker/daemon.json
{
"experimental": true,
"registry-mirrors": ["
https://95duqcml.mirror.aliyuncs.com"],
"insecure-registries": [ "
http://172.16.0.9:5000" ]
}
#重啟生效
systemclt restart dokce
確認是否生效
docker info
4測試上傳
docker pull busybox
docker tag busybox 172.16.0.9:5000/busybox
docker push 172.16.0.9:5000/busybox2