Docker series (iii)---Warehouse

Source: Internet
Author: User
Tags docker run

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.