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"