
foo
다음과 같이 호스트에서 개인 도커 레지스트리를 사용하고 있습니다 docker-compose.yml
.
version: '3.2'
services:
registry:
restart: unless-stopped
image: registry:2
ports:
- 5000:5000
volumes:
- /tmp/myregistry:/var/lib/registry
호스트에서 foo
파일을 추가했습니다./etc/docker/daemon.json
{
"insecure-registries" : [ "localhost:5000" ]
}
그리고 docker info
다음을 보여줍니다:
Insecure Registries:
localhost:5000
127.0.0.0/8
(두 번째 항목이 어디서 나온 것인지 전혀 모르겠습니다.)
하지만 전화가 docker pull localhost:5000/myapp
작동하지 않습니다. 그것은 아무것도 하지 않고 결코 돌아오지 않습니다. 전화해도 마찬가지 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: */*
>
내 VPN(openvpn)을 사용하여 이 호스트의 개인 docker-repository에 액세스하고 앱을 푸시(또는 다른 작업)할 수 있습니다.
(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
방화벽 문제를 배제할 수 있습니다. 어떤 아이디어가 있나요? 티아!
추신: 몇 주 전에는 잘 작동했는데 무엇이 바뀌었는지 모르겠습니다... :(
답변1
도커가 아니라 방화벽 문제입니다.