Docker Warehouse Management

Source: Internet
Author: User
Tags docker run docker registry

1. # Docker Pull Registry//download Registry image, registry an image for Docker, we can use it to create a local Docker private repository.

2, # Docker run-d-P 5000:5000 Registry//Start container with Registry mirror, listen to 5000 ports

# docker exec-it a9f Bash//host and container monitor 5000 ports at the same time

3. # Curl 127.0.0.1:5000//can access it

Access result: "\" Docker-registry server\ ""

4. Upload the image to the private repository:

Download a busybox (very small, easy to test) image first

# Docker Pull BusyBox

# docker Tag BusyBox 10.10.10.201:5000/busybox//Tag the tag, you must have a private warehouse Ip:port

Upload images to a private repository:

# Docker Push 10.10.10.201:5000/busybox

The following error message will be shown (if the IP address is not written on a local IP):

Error response from Daemon:invalid registry endpoint "Http://10.10.10.201:5000/v0/". HTTPS attempt:unable to ping registry endpoint https://10.10.10.201:5000/v0/

V2 Ping attempt failed with Error:get https://10.10.10.201:5000/v2/: Dial TCP 10.10.10.201:5000:connection refused

V1 Ping attempt failed with error:get https://10.10.10.201:5000/v1/_ping:dial TCP 10.10.10.201:5000:connection refused. HTTP attempt:unable to ping registry endpoint http://10.10.10.201:5000/v0/

V2 Ping attempt failed with Error:get http://10.10.10.201:5000/v2/: Dial TCP 10.10.10.201:5000:connection refused

V1 Ping attempt failed with error:get http://10.10.10.201:5000/v1/_ping:dial TCP 10.10.10.201:5000:connection refused

This is because Docker, from the 1.3.X, interacts with the Docker registry by default with HTTPS, but the private repository built here only provides HTTP services, so when interacting with a private repository there is an error above, and in order to solve this problem you need to start Docker Server when you increase the startup parameter to use HTTP access by default, the workaround is

# Vim/etc/init.d/docker

Change $exec-d $other _args to $exec-d--insecure-registry 10.10.10.201:5000 $other _args

Restarting the Docker service

#/etc/init.d/docker Restart

To start the container:

# Docker Start registry_container_id

View all mirrors in a private warehouse

# Curl Http://10.10.10.201:5000/v1/search

Docker Warehouse Management

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.