A curl from node2 gives:
[root@worker2 ~]# curl http://:5000/v2/bram/mynginx/tags/list
{“name”:“bram/mynginx”,“tags”:[“1.0”]}
But when I do a pull I get:
[root@worker2 ~]# docker pull 10.0.0.11:5000/bram/mynginx:1.0
Error response from daemon: Get https://:5000/v1/_ping: http: server gave HTTP response to HTTPS client
I added DOCKER_OPTS="–insecure-registry 10.0.0.11:5000" to /etc/default/docker and restarted the docker service but didn’t help.
What distro are you using (including version), and what is your version of Docker ?
Are you using systemd? If yes, can you check with systemctl status docker that in dockerd command, the --insecure flag is correctly set?
I am using RHEL7.3 on all machines. Docker version is the same on all machines as well:
Client:
Version: 17.04.0-ce
API version: 1.28
Go version: go1.7.5
Git commit: 4845c56
Built: Mon Apr 3 18:01:50 2017
OS/Arch: linux/amd64
Server:
Version: 17.04.0-ce
API version: 1.28 (minimum version 1.12)
Go version: go1.7.5
Git commit: 4845c56
Built: Mon Apr 3 18:01:50 2017
OS/Arch: linux/amd64
Experimental: false
I am using systemd yes… when checking the status I don’t see the --insecure-registry flag so it probably didn’t do anything with /etc/default/docker.
The file /etc/default/docker didn’t exist though, so I created it myself… don’t know if it does anything if it didn’t exist yet?!
Yes, I think the issue lies in your configuration file.
The Docker daemon configuration file is not expected to be /etc/default/docker but /etc/default/docker.json.
You have several options:
you can add directly the --insecure flag in the systemd unit file (/lib/systemd/system/docker.service):
The docker service restart failed ?
What changes did you do ?
Maybe I wasn’t clear in my previous answer but you don’t have to do all the options I gave you, the three solutions are equivalent.
Seriously ? All failed ? You must have a typo, it’s not possible otherwise!
Personally, I prefer to have a distinct configuration file. So here is my conf (which works well):