I am using a private docker registry on the host foo
with the following docker-compose.yml
:
version: '3.2'
services:
registry:
restart: unless-stopped
image: registry:2
ports:
- 5000:5000
volumes:
- /tmp/myregistry:/var/lib/registry
I added at the host foo
the file /etc/docker/daemon.json
{
"insecure-registries" : [ "localhost:5000" ]
}
And docker info
shows:
Insecure Registries:
localhost:5000
127.0.0.0/8
(I really have no idea, where the second entry is from.)
But calling docker pull localhost:5000/myapp
does not work. It simply does nothing and never returns. The same, when I call curl -kv http://localhost:5000/v2/
...
(root@foo)/etc/docker# curl -kv http://localhost:5000/v2/
* Trying 127.0.0.1:5000...
* Connected to localhost (127.0.0.1) port 5000 (#0)
> GET /v2/ HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/7.74.0
> Accept: */*
>
Using my vpn (openvpn), I can access the private docker-repository on this host and push the app (or do anything else).
(thomas@otherhost)~# curl -i http://foo:5000/v2/
HTTP/1.1 200 OK
Content-Length: 2
Content-Type: application/json; charset=utf-8
Docker-Distribution-Api-Version: registry/2.0
X-Content-Type-Options: nosniff
Date: Tue, 14 Jun 2022 22:02:04 GMT
I can exclude a firewall problem. Any ideas? TIA!
PS: Some weeks ago, this works fine, and I have no idea, what has changed ... :(