我有一个使用Nexus的私人PYPI注册中心。我可以从主机上发布/安装而不会出现任何问题(我的个人软件包以及通过PYPI nexus代理获得的常见软件包)。当我尝试使用Dockerfile构建docker映像时,它既不允许我自己也不安装软件包,也不允许通过nexus代理注册表公开安装(但是我仍然可以从常见的公共注册表https://pypi.org/安装公共软件包)。
Dockerfile(部分)
RUN pypy3 -m pip install --index-url https://username:password@host/repository/pypi-proxy/ flask
RUN pypy3 -m pip install --index-url https://username:password@host/repository/pypi-private/ my
错误
Collecting flask
ERROR: Could not find a version that satisfies the requirement flask (from versions: none)
ERROR: No matching distribution found for flask
我看到了DNS问题,但可以从https://pypi.org/安装,所以不是这样。
在index-url变量中指定的URL是存储库URL,而不是索引URL。根据https://help.sonatype.com/display/NXRM3/PyPI+Repositories#PyPIRepositories-ConfiguringPyPIClientTools,索引URL似乎以/ s结尾。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句