Build a docker registry private image to resolve the Docker private warehouse push error

Source: Internet
Author: User
Tags docker run docker registry

Build a Docker registry private image to resolve the Docker private warehouse push error

applies To: Docker 1.8 Environment: Centos7

Each version of the Docker modification configuration content is different, please be optimistic about the installation of the Docker version.

1) Download Docker Registry private image

# Docker Pull

2) Modify the configuration file

# Gedit/etc/sysconfig/docker

Options= '--selinux-enabled--insecure-registry '

Note: The red IP is the modified part

3) Start the registry from the container

# Docker run-d-P 5000:5000--name registry-v/home/dockeruser/data:/tmp/registry

Note:-D indicates that the container is running in the background

-P maps the host's 5000 port to the container's 5000 port

--name name the container named registry

-V means to change the storage location of the mirror "/tmp/registry" to "/home/dockeruser/data" of the host

Note: This step must be after step 2), otherwise modifying the configuration file will not take effect

4) before uploading to a private registry, you need to specify a new registry destination address, which needs to be preceded by the image name

Prefix of host name and port.

#docker Images Node/helloworld

Get 22d56cbd9e6

#docker tag 22d56cbd9e6

Note: is the IP address and port of the host

5) Upload the tagged image to the private library

# Docker Push

The following information is displayed:

The push refers to a repository [] (Len:1)

Sending image list

Pushing repository (1 tags)

D8bd0657b25f:image successfully pushed

A582cd499e0f:image successfully pushed

3c3e582d88fa:image successfully pushed

625e77fff1a8:image successfully pushed

A00e4cef421d:image successfully pushed

F543704611ec:image successfully pushed

C32f3278cf8f:image successfully pushed

5c88f029bcb1:image successfully pushed

D3533bde148f:image successfully pushed

6a06ae308acc:image successfully pushed

9d1508e155f4:image successfully pushed

F3c0db6d5143:image successfully pushed

Df45579dbc81:image successfully pushed

Pushing tag for Rev. [Df45579dbc81] On


Problems encountered:

The push refers to a repository [] (Len:1)

Unable to ping registry endpoint

V2 Ping attempt failed with Error:get Dial TCP refused

V1 Ping attempt failed with error:get TCP refu Sed


# Gedit/etc/sysconfig/docker

Options= '--selinux-enabled--insecure-registry '

Note: This step must be "Step 2" before creating the container for the private warehouse, otherwise the modification configuration file will not take effect the slot: All the answers on the web do not indicate which version of Docker it is. Each version of the Docker modification configuration content is different.

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: 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.