Warehouse
Warehouses ( Repository ) is where the image is centrally stored.
easy to register with the server ( Registry ) confusion. A registered server is a specific server that manages warehouses, and can have multiple warehouses per server, with multiple mirrors underneath each warehouse. A warehouse can be thought of as a specific project or directory. For example, for warehouse address dl.dockerpool.com/centos , dl.dockerpool.com is the registered server address, CentOS is the warehouse name.
Register DockerHub
[[email protected] ~]# docker loginusername: changfeipassword: email: account created. please use theconfirmation link we sent to your e-mail to activate it. [[email protected]~]# cat .dockercfg #注册完成后会在本地的 Save the user's authentication information in the. dockercfg file. { "https://index.docker.io/v1/":{ "auth": "anvjagfuz2zlatoxmjm0nty=", "Email": "[email protected]" }} [[email protected]~]# docker search -s 9 centos     #-S specifies that only images above the specified number are displayed
650) this.width=650; "title=" 1.png "alt=" wkiom1wf19eyogz0aaejaqu8lyq901.jpg "src=" http://s3.51cto.com/wyfs02/M02/ 6f/90/wkiom1wf19eyogz0aaejaqu8lyq901.jpg "/>
[Email protected]~]# Docker Pull CentOS #下载镜像 [[Email protected]~]# Docker Pushcentos #上传镜像
Create a private warehouse
Method One:
Dockers not only provides a central repository, but also allows us to use Registry build a local private warehouse.
[email protected] ~]# Docker run-d-p5000:5000 Registry
The default warehouse is created within the container. /tmp/registry , so that if the container is deleted, the image stored in the container is lost, so we typically specify that a local directory is attached to the container's /tmp/registry , you can use the - v parameter to store the image file in the specified path. For example, the following example will specify the local /opt/registry: directory to mount to the container's /tmp/registry directory.
[[Email protected]~]# Docker run-d-P 5000:5000-v/opt/registry:/tmp/registry registry #MD, pull not down
Method Two:
Blank
This article is from "Gan nan has" blog, please be sure to keep this source http://changfei.blog.51cto.com/4848258/1673077
Docker series (iii)---Warehouse