Docker—— 8.docker registry

1.pull resgistry

[root@master ~]# docker search registry
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/registry The Docker Registry 2.0 implementation for… 2952 [OK]
docker.io docker.io/distribution/registry WARNING: NOT the registry official image!!.. 57 [OK]
[root@master ~]# docker pull docker.io/registry

2. run resgistry container

[root@master ~]# docker run -d -p 5000:5000 --restart always --name registry docker.io/registry

3. config resgistry file daemon.json

[root@node2 ~]# vim /etc/docker/daemon.json
{
“registry-mirrors”: [“https://registry.docker-cn.com”,“http://hub-mirror.c.163.com”,“https://docker.mirrors.ustc.edu.cn”,“https://docker.mirrors.ustc.edu.cn”],
“insecure-registries”:[“registry:5000”]
}
[root@node2 ~]# systemctl daemon-reload && systemctl restart docker

4. push image to resgistry

[root@master ~]# docker tag httpd registry:5000/blueiceximages/httpd
[root@master ~]# docker push registry:5000/blueiceximages/httpd

5. check up resgistry

[root@master ~]# curl http://192.168.0.77:5000/v2/_catalog
{“repositories”:[“blueiceximages/httpd”]}

6. pull image from resgistry

[root@node2 ~]# docker pull registry:5000/blueiceximages/httpd
Using default tag: latest
Trying to pull repository registry:5000/blueiceximages/httpd …
latest: Pulling from registry:5000/blueiceximages/httpd
Digest: sha256:a2c6e9c047dd063b817ddc536e0076eb3738f3dbb32b8c9dc15760a2fedfc735
Status: Downloaded newer image for registry:5000/blueiceximages/httpd:latest
————Blueicex 2020/05/14 19:27 blueice1980@126.com

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值