我有一个本地的Jfrog Artifactory Pro。
我用“ http://localhost:8081/artifactory/webapp/#/home”去我的工厂。
我创建了本地Docker注册表:
我从Rest API配置了直接反向代理:
$ curl -u admin:xxxxxx-i "http://127.0.0.1:8081/artifactory/api/system/configuration/webServer"
HTTP/1.1 200 OK
Server: Artifactory/6.2.0
X-Artifactory-Id: de89ec654198c960:3f9aa2d0:167a7c20d5e:-8000
Access-Control-Allow-Methods: GET, POST, DELETE, PUT
Access-Control-Allow-Headers: X-Requested-With, Content-Type, X-Codingpedia
Cache-Control: no-store
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sun, 16 Dec 2018 13:04:52 GMT
{
"key" : "direct",
"webServerType" : "DIRECT",
"artifactoryAppContext" : "artifactory",
"publicAppContext" : "artifactory",
"serverName" : "127.0.0.1",
"serverNameExpression" : "*.localhost",
"artifactoryServerName" : "localhost",
"artifactoryPort" : 8081,
"dockerReverseProxyMethod" : "SUBDOMAIN",
"useHttps" : false,
"useHttp" : true,
"httpsPort" : 443,
"httpPort" : 8081,
"upStreamName" : "artifactory"
}
来自工件的配置:
我想通过Docker客户端登录到我的注册表“ mylocaldocker”,但出现错误:
$ docker login mylocaldocker.localhost -u admin -p xxxxxx
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: Get https://mylocaldocker.localhost/v2/: dial tcp: lookup mylocaldocker.localhost on 192.168.65.1:53: no such host
如何登录人工docker注册表?并向其中拉/推图像!?
答案 0 :(得分:0)
首先:与Artifactory相关的docker登录->配置-> HTTP设置我使用“ Docker访问方法”作为“存储库路径”
docker login -u admin -p **** x.x.x.x:8081
第二: 由于docker中的限制,我们无法使用登录到localhost的权限。 我们应该用真实机器的IP(专用IP)替换“ localhost”或“ 127.0.0.1”。
然后将private_ip:8081(x.x.x.x:8081)添加到Docker中不安全的注册表中。 请参阅以下链接的答案:Pull Artifactory Docker Images