Docker registry push Error "server gave HTTP response to HTTPS client"

Source: Internet
Author: User

System Environment: CENTOS7

Docker version: 1.12.3 (note the version, there may be different version settings different scenarios)

Docker Registry version: 2.4.1

Problem:

Successfully installed Docker registry, entered Http://192.168.1.100:5000/v2 in the browser and successfully returned the JSON data. When you push to Docker registry, the report:

[email protected] sysconfig]# Docker push 192.168.1.100:5000/registry:2.4.1the push refers to a repository [192.168.1.10 0:5000/registry]get Https://192.168.1.100:5000/v1/_ping:http:server gave HTTP response to HTTPS client

This problem may be caused by the client using Https,docker registry without the HTTPS service. One way to handle this is to change the customer's address "192.168.1.100:5000" request to HTTP.

Many articles now address this issue by modifying Docker's configuration file "Etc/systemconfig/docker" and restarting Docker. But found that the docker1.12.3 version does not have this file, according to create this file online, and fill in the appropriate content, restart Docker no effect, still reported this error.

Workaround:

Under the "/etc/docker/" directory, create a "Daemon.json" file. Write in File:

{"Insecure-registries": ["192.168.1.100:5000"]}

After saving exits, restart Docker. Problem solving:

[email protected] docker]# Docker push 192.168.1.100:5000/registry:2.4.1the push refers to a repository [192.168.1.100:5 000/REGISTRY]EE8E809CFDE5:PUSHEDBA20D499F984:PUSHED705E35F12F24:PUSHED42755CF4EE95:PUSHED2.4.1:DIGEST:SHA256: B66c4af9577744ae6d32e975808230e2ff558a5d50a7968d5102a900e147f3d5 size:1158

Windows Server 2016, the default installation of Docker configuration file in "C:\ProgramData\docker\config\". You can create a "Daemon.json" file under this directory to resolve this issue.

Docker registry push Error "server gave HTTP response to HTTPS client"

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.