通过Nginx作为Docker Registry的Artifactory

时间:2018-03-20 22:39:45

标签: docker nginx artifactory

我在使用Artifactory作为docker注册表时遇到了问题。

Artifactory和Nginix在一台机器上运行,它们都在自己的docker容器中运行。 Artifactory设置为使用子域的反向代理。已使用子域更新DNS服务器,并且Nginx已加载通配符SSL证书。客户端计算机已加载Cert文件,因此它们接受自签名证书。

我在http或https端口上访问Artifactory没有问题。詹金斯推动并拉得很好。

另一方面,Docker不想正常工作。发生了一些奇怪的事情。

1)docker login命令有效并显示登录成功。但是在Artifactory中

2018-03-20 21:40:03,602 [DENIED LOGIN]  for NA/172.17.0.3.
2018-03-20 21:40:14,358 [DENIED LOGIN]  for NA/172.17.0.3.
2018-03-20 21:40:47,716 [DENIED LOGIN]  for NA/172.17.0.3.
2018-03-20 21:40:57,874 [DENIED LOGIN]  for NA/172.17.0.3.

172.17.0.3是Docker容器中Artifactory的内部IP。我猜测当数据通过Nginx时,客户端和Artifactory之间的登录发生了一些事情

2)docker push开始推动。但是当图层达到100%时,它会一遍又一遍地重试,直到它超时。但这会导致Artifactory中出现不完整的文件。如果我尝试通过curl或在浏览器中删除一个,我会收到错误

Failed to delete item with id '14052': ORA-00942: table or view does not exist

但是带有这些ID的相应项仍然在Oracle DB中,必须手动删除才能将它们从Artifactory中删除。

3)当推送发生时,它会在日志文件中引起一些奇怪的消息。

2018-03-20 21:10:04,242 [DENIED LOGIN]  for NA/172.17.0.1.
2018-03-20 21:10:04,873 [ACCEPTED DEPLOY] docker-local:dpa-base/_uploads/415150da-c6ce-458c-87c4-765838e7c38e for ppapp/172.17.0.1.
2018-03-20 21:10:05,441 [ACCEPTED DELETE] docker-local:dpa-base/_uploads/415150da-c6ce-458c-87c4-765838e7c38e for _system_.
2018-03-20 21:10:07,339 [ACCEPTED DEPLOY] docker-local:dpa-base/_uploads/6ccd5e57-b237-451e-b547-581618b5227a for ppapp/172.17.0.1.
2018-03-20 21:10:07,468 [ACCEPTED DEPLOY] docker-local:dpa-base/_uploads/03bb5d96-7ce0-468b-ab0f-d3a08efcdccb for ppapp/172.17.0.1.
2018-03-20 21:10:07,501 [ACCEPTED DELETE] docker-local:dpa-base/_uploads/6ccd5e57-b237-451e-b547-581618b5227a for _system_.
2018-03-20 21:10:07,568 [ACCEPTED DELETE] docker-local:dpa-base/_uploads/03bb5d96-7ce0-468b-ab0f-d3a08efcdccb for _system_.
2018-03-20 21:10:07,728 [ACCEPTED DEPLOY] docker-local:dpa-base/_uploads/3c445392-7ff2-4375-b55a-f041edda1160 for ppapp/172.17.0.1.
2018-03-20 21:10:07,938 [ACCEPTED DELETE] docker-local:dpa-base/_uploads/3c445392-7ff2-4375-b55a-f041edda1160 for _system_.
2018-03-20 21:10:45,796 [DENIED LOGIN]  for NA/172.17.0.1.
2018-03-20 21:10:46,551 [ACCEPTED DEPLOY] docker-local:docker/dpa-base/_uploads/716bc4bf-dea7-4da8-a31d-8c4e7ea54fdc for ppapp/172.17.0.1.
2018-03-20 21:10:46,698 [ACCEPTED DELETE] docker-local:docker/dpa-base/_uploads/716bc4bf-dea7-4da8-a31d-8c4e7ea54fdc for _system_.
2018-03-20 21:10:48,632 [ACCEPTED DEPLOY] docker-local:docker/dpa-base/_uploads/51df5746-e96e-43c5-8473-20083690a5bf for ppapp/172.17.0.1.
2018-03-20 21:10:48,774 [ACCEPTED DELETE] docker-local:docker/dpa-base/_uploads/51df5746-e96e-43c5-8473-20083690a5bf for _system_.
2018-03-20 21:10:48,866 [ACCEPTED DEPLOY] docker-local:docker/dpa-base/_uploads/1f76e046-a574-407a-86b1-619e0b777ed7 for ppapp/172.17.0.1.
2018-03-20 21:10:48,995 [ACCEPTED DEPLOY] docker-local:docker/dpa-base/_uploads/6b517a6c-94c9-4ca4-8a35-30d327022a05 for ppapp/172.17.0.1.
2018-03-20 21:10:49,041 [ACCEPTED DELETE] docker-local:docker/dpa-base/_uploads/1f76e046-a574-407a-86b1-619e0b777ed7 for _system_.
2018-03-20 21:10:49,203 [ACCEPTED DELETE] docker-local:docker/dpa-base/_uploads/6b517a6c-94c9-4ca4-8a35-30d327022a05 for _system_.

我不太清楚这里发生了什么。任何帮助都会很棒。

0 个答案:

没有答案