无法安装位于docker build上的私人Nexus存储库中的python软件包

问题描述 投票:0回答:1

我有一个使用Nexus的私有PYPI注册中心。我可以从主机上发布/安装而不会出现任何问题(我的个人软件包以及通过PYPI nexus代理获得的常见软件包)。当我尝试使用Dockerfile构建docker映像时,它既不允许我自己也不安装软件包,也不允许我通过nexus代理注册表安装public(但是我仍然可以从通用公共注册表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/安装,所以不是这样。

python docker nexus pypi
1个回答
0
投票

在index-url变量中指定的URL是存储库URL,而不是索引URL。对于https://help.sonatype.com/display/NXRM3/PyPI+Repositories#PyPIRepositories-ConfiguringPyPIClientTools,索引URL似乎以/ simple结尾。

© www.soinside.com 2019 - 2024. All rights reserved.