[Solved] http: server gave HTTP response to HTTPS client

http: server gave HTTP response to HTTPS client

The reason for this problem is: since 1.3. X, docker registry uses HTTPS by default for interaction, but HTTP service is used by default for building private image, so the above error occurs when interacting with private image

This error is an error encountered when uploading a private image locally:

The solution is: when the docker server is started, add the startup parameters and use HTTP access by default

vim /usr/lib/systemd/system/docker.service

Add — insure registry IP: 5000 after line 12

Restart docker service after modification

systemctl daemon-reload

systemctl restart docker

After restarting the docker service, restart the container

docker start $(docker ps -aq)

if the above methods still can’t be solved, the following methods can be used:

1. Add a daemon.json file to VIM/etc/docker/daemon.json

{ "insecure-registries":["192.168.1.100:5000"] }
Save and exit

2. Restart the docker service
systemctl daemon-reload
systemctl restart docker

3. Restart the container
4. Upload the image
docker push 。。。。

The second question is: Get https://192.168.2.119/v2/: dial tcp 192.168.2.119:443: getsockopt: connection refused

Reason: Didn’t specify the address of the image to be uploaded, site. The default is docker.io

Solution: docker tag <imagesname> <ip:port/image>

docker push ip:port/image

Similar Posts: