Docker Warehouse related commands

Source: Internet
Author: User
Tags docker hub docker run

Warehouses (Repository) are places where images are stored centrally. An easy-to-confuse concept is the registration server (Registry). In fact, registering the server is the specific server that holds the warehouse, each server can have multiple warehouses, and there are multiple mirrors under each warehouse. In this respect, a warehouse can be considered a specific project or directory. For example, for warehouse address Dl.docker-pool.com/ubuntu, dl.dockerpool.com is the registered server address, and Ubuntu is the warehouse name. The warehouse is divided into public warehouses and private warehouses, in this chapter I will show how to use the Dockerhub official warehouse for login, download and other basic operations, as well as using the Dockerpool community to provide a warehouse download image, and finally the creation and use of the private warehouse basic operations.

Docker Hub

currently Docker maintains a public warehouse https://hub.docker.com, which already includes more than 15,000 mirrors.

Landing

Docker login is used to complete the registration login, after the registration is successful, the user's authentication information will be saved in the. Dockercfg of the local user directory.

These mirrored resources can be divided into two categories, depending on whether they are officially provided. One is a base image like CentOS, called the base or root image. These images are created, validated, supported, and provided by Docker. Such images tend to use a single word as their name. There is also a type, such as a Tianon/centos mirror, which is created and maintained by the user Tianon of Docker-hub, with a user name prefixed to a warehouse that is a user. A user-supplied mirror can be specified using the username prefix user_name/, such as the Tianon user's image prefix of tianon/.

Automatically created

The auto-Create (automated Builds) feature is very handy for upgrading the in-mirror program frequently. Sometimes the user creates a mirror, installs a software, and if the software releases a new version, it needs to update the image manually. Can be set up on the Docker hub website after logging in to the account.

Create a private warehouse using a registry image

A local, privately owned warehouse can be simply built from an official registry image:

sudo docker run-d-P 5000:5000 Registry

By default, the warehouse is created in the container's/tmp/registry directory, and the mirror Weng can be stored on the specified local path through the-v parameter, such as:

sudo docker run-d-p 5000:5000-v/opt/data/registry:/tmp/registry Registry

You can then upload the download image locally via the tag command and the Push|pull command.


Docker Warehouse related commands

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.