docker-devpi icon indicating copy to clipboard operation
docker-devpi copied to clipboard

mirroring does not work when accessed from host machine.

Open bhanuvrat opened this issue 10 years ago • 4 comments

when running from the host machine, pip complains as follows:

➜  ~  pip install -i http://192.168.99.100:3141/root/pypi/ --upgrade flask
Collecting flask
  The repository located at 192.168.99.100 is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host 192.168.99.100'.
  Could not find a version that satisfies the requirement flask (from versions: )
No matching distribution found for flask
➜  ~

while the devpi server running inside the container prints out:

devpi_1    | 2015-10-14 11:04:40,368 INFO  [req18] GET /root/pypi/flask/
devpi_1    | 2015-10-14 11:04:40,375 INFO  [req19] GET /root/pypi/+simple/Flask

At the same time, when requested from inside a container tho whole thing works flawlessly. bug, or am I missing something very obvious?

bhanuvrat avatar Oct 14 '15 11:10 bhanuvrat

and have you tried adding --trusted-host 192.168.99.100 ?

dangra avatar Oct 20 '15 17:10 dangra

I use this image for development on a vagrant machine, my images have the following instruction in its Dockerfile ENV PIP_TRUSTED_HOST 172.17.42.1.

It is interesting that Docker 1.9.0 will finally allow to pass different envvars at docker build time.

dangra avatar Oct 20 '15 17:10 dangra

cool. let me try and get back to you.

bhanuvrat avatar Oct 20 '15 17:10 bhanuvrat

if you put devpi behind a https url (with valid certificate) it (pip) won't complain.

dangra avatar Oct 20 '15 17:10 dangra