My problem
I am trying to install a Flask app on a docker container. The app requires some packages to be installed via pip.
I am using a local (host, not container) pip repo on port 9000. Therefore, I tried the following:
pip install -i 127.0.0.1:9000/simple my_custom_package
This call works on the host, but when I run it on the container I get:
Collecting my_custom_package
Url '127.0.0.1:9000/simple/my_custom_package/' is ignored.
It is either a non-existing path or lacks a specific scheme.
I made some attempts with curl
, but it seems that the container can't simply access a port on the host machine.
Settings
- OSX 10.11.6
- Docker version 1.12.1, build 6f9534c
- tiangolo/uwsgi-nginx-flask image
What have I tried
- I have read How to access host port from docker container, but the solution does not work for OSX.
- Access host not vm from inside container, but the data is outdated and the solutino does not work on my system.
How do I access host ports from a Docker container on OSX?