Reputation: 504
I have a private PyPi registry using Nexus. I can publish/install from my host machine without any problems (my personal packages as well as common packages via PyPi nexus proxy). When I try to build a docker image using Dockerfile it allows me to install neither my own packages nor public through the nexus proxy registry (but I still can install public packages from common public registry https://pypi.org/).
Dockerfile (part)
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
Error
Collecting flask
ERROR: Could not find a version that satisfies the requirement flask (from versions: none)
ERROR: No matching distribution found for flask
I saw issues with DNS but I can install from https://pypi.org/
so its not the case.
Upvotes: 3
Views: 5829
Reputation: 2645
URLs specified in index-url
variable were repository URLs not index URLs.
Per https://help.sonatype.com/display/NXRM3/PyPI+Repositories#PyPIRepositories-ConfiguringPyPIClientTools, index URLs seem to end in /simple
.
Upvotes: 6