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:
Docker push 192.168.1.100:5000/registry:2.4.1 The push refers to a repository [192.168. 1.100: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 fact that the Docker registry is not using HTTPS services.
Many articles 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:
Docker push 192.168.1.100:5000/registry:2.4.1 The push refers to a repository [192.168.1.100:/registry]ee8e809cfde5:pushedba20d499f984: Pushed705e35f12f24:Pushed42755cf4ee95:Pushed2.4. 1 1158
Reference article:
Http://stackoverflow.com/questions/38695515/can-not-pull-push-images-after-update-docker-to-1-12
Centos7 Docker registry push error "server gave HTTP response to HTTPS client"