Docker Quick Start Series (3): Warehouse concept and related operations

Source: Internet
Author: User
Tags docker hub

Docker Hub

First, we first distinguish between the next two concepts, one is the warehouse, and the other is the registration server.
The repository in Docker is the place where the image is centrally stored, and the registered server is placed in the warehouse.
A registered server can hold multiple warehouses, for example:

#注册服务器的地址是dl.dockerpool.com#仓库的名字是ubuntu

What is Docker hub, if you've ever used GitHub, actually Docker hub and GitHub
Similarly, the former is where the management image is stored, which is where the management code is stored. In fact
The way it is now is the same.

can be registered with the Docker login command on this machine. After the registration is complete, there will be a. dockercfg file in the user's directory, and your authentication information will be stored here.
Here we look for an Ubuntu image

Here there are two forms of name, one is a word consisting of the first one, and from the back of the field information can be seen that this is the official standard version of the image.
The second form of xxx/xxx. Like what:

ansible/ubuntu14.04#这个意思是docker用户ansible创建的一个版本的ubuntu镜像
Automatically update the container for mirroring within the program

You may encounter a problem, an application update problem, or a new version of the opposite sex must be available.
The auto-Update here solves this problem, and Docker's auto-create feature allows the user to specify, through the Docker hub, to track a project on a target site (currently only supported on GitHub and BitBucket), which, once a new version is submitted, Docker will automatically perform the creation. What if you configure auto-creation?
Step hygienic Handrub as follows:
1: Create and log in to the Docker hub, associate the target site
2: Configure an auto-create in the Docker hub
3: Select a project and branch in a target site
4: Establish the location of the dockerfile and submit to create
Track the status of each creation later in the auto Create page in the Docker hub

#这里我们只是说下流程,在博客中有一篇关于怎么配置Docker的自动创建的专题文章
Create and use a private warehouse

Once the Docker is installed, you can easily build a local private warehouse environment with an official registry image:

5000:5000 registry#这里的-p 5000:5000是指把宿主机的5000端口映射到registry镜像容器的5000端口上。

After a registry container is automatically downloaded and started, a local private warehouse service is created, and the warehouse is created in the container's/tmp/registry directory by default. You can use the-v parameter to store the image file on a locally-established path.

5000:5000 -v /opt/data/registry:/tmp/registry registry
Management of Private warehouse images
docker images


Use the Docker tag command to mark Image job1:latest as 127.0.0.1:5000/test format

127.0.0.1:5000/test


Next we use the Docker push to upload the tagged Image:

127.0.0.1/test#我们把镜像推向我们配置的私有服务器的test仓库,当然这里我们是在本机模拟的

Docker Quick Start Series (3): Warehouse concept and related operations

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.