distribution: Server Gave HTTP Response to HTTPS Client error
Hi,
I am trying to run docker registry in insecure mode and when I am either trying to push or to pull. I get the following error:
This is command I used in order to run my registry:
# docker run -d -p 5000:5000 --restart=always --name registry -v `pwd`/data:/var/lib/registry reg
istry:2
~# docker push <IP>:5000/ubuntu
The push refers to a repository [<IP>:5000/ubuntu]
Get https://<IP>:5000/v1/_ping: http: server gave HTTP response to HTTPS client
This is the version info:
docker version
Client:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 05:33:38 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 05:33:38 2016
OS/Arch: linux/amd64
docker info
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 2
Server Version: 1.12.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 12
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-34-generic
Operating System: Ubuntu 16.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.858 GiB
Name: dock
ID: S6TG:K4K3:XSYK:VZWE:X27Y:RZUO:Z2FA:ATZT:ZBIP:KGHY:AGUZ:NLLD
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
127.0.0.0/8
This is what I added into /etc/default/docker file
DOCKER_OPTS="--insecure-registry <myip>:5000"
I tried edited that line with FQDN, IP address, --insecure-registry=<myip>:5000, and--insecure-registry http://<myip>:5000
Any ideas what could be causing this error?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (2 by maintainers)
Try adding --insecure-registry option to daemon in /etc/systemd/system/docker.service.d/docker.conf file. Then sudo systemctl daemon-reload And sudo service docker restart
It worked for me