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:
- Docker ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? [How to Solve]
- [Solved] Docker Starup Error: Failed to start Docker Application Container Engine.
- [Solved] kuberlet Service Startup Error: “Failed to run kubelet” err=”failed to run Kubelet: misconfiguration: kubelet cgroup driver: \”systemd\” is different from docker cgroup driver: \”cgroupfs\””
- Harbor 443 connect connection refused [How to Solve]
- docker pull Error: Get https://hub.xxx.com/v1/_ping: dial tcp 192.168.1.8:443: getsockopt: connection refused
- An error is reported when logging into harbor warehouse with docker login of other hosts
- [How to]docker http: server gave HTTP response to HTTPS client
- [Solved] Failed to start Docker Application Container Engine.
- An error is reported when the docker command is executed in Jenkins
- Job for docker.service failed because the control process exited with error code. See “syste…