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 [email protected]

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